Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cannot remove fullscreen window border
Qt 6.11 is out! See what's new in the release blog

Cannot remove fullscreen window border

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Boofish
    wrote on last edited by Boofish
    #1

    Hello,

    I'm using qt 4.8.7 and trying to create a borderless fullscreen window on linux (ubuntu) and also on embedded. I use the following code:

    ```
    MainWidget widget;
    widget.window()->setFixedSize(QSize(SCENE_WIDTH, SCENE_HEIGHT));
    widget.setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
    
    // add QGraphicsScene
    
    widget.showFullScreen();
    
    The result is this:
    
    ![0_1559559476329_borderedWindow.png](https://ddgobkiprc33d.cloudfront.net/61c2c6d5-6ed9-40ec-bea1-3cf89181b325.png)
    
    As you can see there is a grey border. How do  I remove it?
    jsulmJ 1 Reply Last reply
    0
    • B Offline
      B Offline
      Boofish
      wrote on last edited by
      #4

      The solution to this on qt 4.8.7 is to call setFrameStyle on the qgraphicsview like so:

      QGraphicsView view;
      view.setFrameStyle(QFrame::NoFrame);

      1 Reply Last reply
      1
      • B Boofish

        Hello,

        I'm using qt 4.8.7 and trying to create a borderless fullscreen window on linux (ubuntu) and also on embedded. I use the following code:

        ```
        MainWidget widget;
        widget.window()->setFixedSize(QSize(SCENE_WIDTH, SCENE_HEIGHT));
        widget.setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
        
        // add QGraphicsScene
        
        widget.showFullScreen();
        
        The result is this:
        
        ![0_1559559476329_borderedWindow.png](https://ddgobkiprc33d.cloudfront.net/61c2c6d5-6ed9-40ec-bea1-3cf89181b325.png)
        
        As you can see there is a grey border. How do  I remove it?
        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Boofish Why do you set fixed window size if you want to show as full-screen?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Boofish
          wrote on last edited by Boofish
          #3

          @jsulm Is that related? The code uses a fixed size because I run the application on both the target board (embedded) that uses resolution 800x480 as well as on ubuntu dev machine that uses 1920x1080. The SCENE_WIDTH is 800, and SCENE_HEIGHT is 480. There is a border on both.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Boofish
            wrote on last edited by
            #4

            The solution to this on qt 4.8.7 is to call setFrameStyle on the qgraphicsview like so:

            QGraphicsView view;
            view.setFrameStyle(QFrame::NoFrame);

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved