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. Titlebar disappears when using showNormal() after showFullScreen() on Windows 7
Forum Updated to NodeBB v4.3 + New Features

Titlebar disappears when using showNormal() after showFullScreen() on Windows 7

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.9k 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.
  • C Offline
    C Offline
    CandyManJ
    wrote on last edited by
    #1

    Hi,

    After using showFullScreen() function on QMainWindow (Or setWindowState(Qt::WindowFullScreen) and then using showNormal() (Or setWindowState(Qt::WindowNoState), the titlebar and the borders disappear as if it was a FramelessWindowHint, and if I use setWindowFlags the whole window disappears.

    I am using Qt 5.2.1 and MinGW

    Thanks!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      CandyManJ
      wrote on last edited by
      #2

      Anyone familiar with this problem?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ambershark
        wrote on last edited by
        #3

        Can you try this and see if there is a difference in the window flags values:

        @
        Qt::WindowFlags saved = widget->widowFlags();
        widget->showFullScreen();
        widget->showNormal();
        Qt::WindowFlags after = widget->windowFlags();

        if (saved != after)
        {
        // log message, qDebug, or messagebox here to let you know.
        }
        @

        My suspicion is that the window flags are getting screwed up and not returned to normal on your showNormal call.

        You can also try a showMaximized() before showNormal() and see if that fixes it. Since maximizing would set the window flags back to what they should be in a normal window.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        0
        • C Offline
          C Offline
          CandyManJ
          wrote on last edited by
          #4

          Fixed it by doing the following:

          @Window->showFullScreen();
          Window->showNormal();
          Window->setWindowFlags(Qt::Window);
          Window->show(); //seems that setWindowFlags resets the window parent and thus it needs to be shown again@

          That is not a permanent fix, since a bug is a bug and the user should not go through these steps in order to fix this.

          Thank you!

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

            Hi,

            You should also check if you are still experiencing this with the latest 5.3

            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
            0

            • Login

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