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. Problem when calling setWindowState(Qt::WindowFullScreen);

Problem when calling setWindowState(Qt::WindowFullScreen);

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 1.6k 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.
  • N Offline
    N Offline
    nicky j
    wrote on last edited by
    #1

    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
    0
    • Z Offline
      Z Offline
      zeljko
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nicky j
        wrote on last edited by
        #3

        same result

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zeljko
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nicky j
            wrote on last edited by
            #5

            OS X 10.9

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              zeljko
              wrote on last edited by
              #6

              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
              0
              • Z Offline
                Z Offline
                zeljko
                wrote on last edited by
                #7

                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
                0

                • Login

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