Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Central Widget and full screen
Forum Updated to NodeBB v4.3 + New Features

Central Widget and full screen

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 2.3k Views 1 Watching
  • 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.
  • PavelMP Offline
    PavelMP Offline
    PavelM
    wrote on last edited by
    #1

    It is possile show central widget of QMainWindow at fullscreen? (only central widget)

    This code create an exception

     setCentralWidget(ui->widget);
    
      ui->widget->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint );
      ui->widget->showFullScreen();
    
    

    Pavel

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should then remove the child widget from MainWindow's central widget and then make it full screen. When done put it back as central widget.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • Ni.SumiN Offline
        Ni.SumiN Offline
        Ni.Sumi
        wrote on last edited by
        #3

        Hi @PavelM ,

        Here is the code sample that it can do, what Mr. @SGaist told. It has to be removed/ make it floated and then Fullscreen yb double click and the next double click on it brigns back to normal from Fullscreen.

        https://forum.qt.io/topic/23308/how-to-fullscreen-the-child-widget/8

        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