Qt Forum

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

    Problem when calling setWindowState(Qt::WindowFullScreen);

    General and Desktop
    2
    7
    1313
    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.
    • N
      nicky j last edited by

      Hello!

      I have been having trouble when calling this slot:
      @
      void QWwindow::maximizeWindow()
      {
      qDebug() << "SLOT: QWwindow::maximizeWindow() STATUS: Called";
      this->setWindowState(Qt::WindowFullScreen);
      qDebug() << "SLOT: QWwindow::maximizeWindow() STATUS: Completed";
      }
      @
      Whenever I call this slot, nothing happens.
      I am getting output from both qDebugs, leading me to think that there is something wrong with the code itself. Any ideas on how I fix it?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Z
        zeljko last edited by

        Have your tried to call showFullScreen() instead of setting state ?

        1 Reply Last reply Reply Quote 0
        • N
          nicky j last edited by

          same result

          1 Reply Last reply Reply Quote 0
          • Z
            zeljko last edited by

            Then something else is wrong with your code. That should work.btw. What OS is that ?

            1 Reply Last reply Reply Quote 0
            • N
              nicky j last edited by

              OS X 10.9

              1 Reply Last reply Reply Quote 0
              • Z
                zeljko last edited by

                hm...indeed, just tried that on my Mac (10.6.8) and it does not work (qt-4.7.4).
                looks like bug.
                https://bugreports.qt-project.org/browse/QTBUG-28891
                https://bugreports.qt-project.org/browse/QTBUG-34629

                1 Reply Last reply Reply Quote 0
                • Z
                  zeljko last edited by

                  Maybe this will give you an idea:
                  http://www.qtforum.org/article/520/mac-os-x-full-screen.html

                  It's carbon based workaround, you have to find out how to call cocoa api and hide menu bar (and show it again).

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