Important: Please read the Qt Code of Conduct -

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

  • 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


  • Anyone familiar with this problem?

  • Moderators

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

    Qt::WindowFlags saved = widget->widowFlags();
    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.

  • Fixed it by doing the following:

    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!

  • Lifetime Qt Champion


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

Log in to reply