Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Maximizing the tool to full screen

    Tools
    2
    2
    434
    Loading More Posts
    • 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.
    • S
      serendipity2 last edited by

      I found some code for maximizing my GUI:
      void MainWindow::mouseDoubleClickEvent(QMouseEvent *e) {
      QWidget::mouseDoubleClickEvent(e);
      if(isFullScreen()) {
      this->setWindowState(Qt::WindowMaximized);
      } else {
      this->setWindowState(Qt::WindowFullScreen);
      }
      }

      It works for the main window fine. How do I arrange my buttons that they fit in the full screen optic?
      Where can I look it up?
      What is the best solution to do this?

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @serendipity2 last edited by

        @serendipity2 Use layouts: http://doc.qt.io/qt-5/layout.html
        http://doc.qt.io/qt-5/examples-layouts.html

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

        1 Reply Last reply Reply Quote 1
        • First post
          Last post