Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.5.1
-
None
-
Windows 10 64bit
Description
When a window is maximized and I repeatedly go to full screen and back, after the first or second time the full screen shows some kind of glitch. Suddenly you can see windows 7 window decorations at the side of the window (I'm on windows 10).
The code to reproduce it is attached below. It is just the default QMainWindow application with a function to toggle full screen when the key 'F' is pressed.
The issue can be reproduced as follows:
- Maximize the MainWindow (the maximize button on the top right)
- press F, F, F, F, F to go to full screen, back, and to full screen again and back and to full screen
A screen shot of how it looks on my maschine is attached.
main.cpp
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QKeyEvent> class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0) : QMainWindow(parent) {} ~MainWindow() {} protected: virtual void keyPressEvent( QKeyEvent * event ) { if (event->key() == Qt::Key_F) { setWindowState(windowState() ^ Qt::WindowFullScreen); } } }; #endif // MAINWINDOW_H
Attachments
Issue Links
- relates to
-
QTBUG-53368 If window frame geometry is equal to screen geometry, making it fullscreen won't change inner surface size (after some repeats)
-
- Open
-