Titlebar disappears when using showNormal() after showFullScreen() on Windows 7
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?
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.
You should also check if you are still experiencing this with the latest 5.3