Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Maximizing the tool to full screen

Maximizing the tool to full screen

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 599 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.
  • S Offline
    S Offline
    serendipity2
    wrote on last edited by
    #1

    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?

    jsulmJ 1 Reply Last reply
    0
    • S serendipity2

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      1

      • Login

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