Maximized frameless window bug with enabled high dpi
-
I would replace
void MainWindow::maximizeWindow() { window()->setWindowState(Qt::WindowMaximized); window()->setGeometry(qApp->primaryScreen()->availableGeometry()); // This line is weird, see http://doc.qt.io/qt-5/application-windows.html#window-geometry }with
void MainWindow::maximizeWindow() { window()->showMaximized(); } -
Hi
Super with runable test project.
I tried the same a few times.
Maximize
Hide
Flipflop resolution ( say yes to keep it)
Then press the tray iconIn all cases, the "4" was still visible and it appears to have correct size.
I am using Qt 5.7
-
Hi
Super with runable test project.
I tried the same a few times.
Maximize
Hide
Flipflop resolution ( say yes to keep it)
Then press the tray iconIn all cases, the "4" was still visible and it appears to have correct size.
I am using Qt 5.7
-
@mrjj maybe he's opening the window on a secondary monitor? I'm relatively new to Qt, but still want to help.
@nestorac
Welcome on board then :)
Yes something must be different if he sees the bug and i cant get it.
Also he has Qt5.6 and i have Qt5.7But it sounds like he click on tray icon and as far as i know, this restore the
window to whatever screen it is/was on.Did u try test project, its just works so very easy to test.
( you can download as zip if do not use GIT) -
I get:
make
main.cpp:6:32: error: 'AA_EnableHighDpiScaling' is not a member of 'Qt' QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); ^ main.cpp:7:32: error: 'AA_UseHighDpiPixmaps' is not a member of 'Qt' QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -
Super
thank you for testing also.
I will see if I can get a 5.6 on win 10 to test with.
Not sure its a bug yet :) -
-
-
-
I cannot reproduce it with Linux since it is necessary to log in and out to try, to change the DPI, so it should always work. Maybe this is the problem? That you need to log out and in? Or it might be a bug of Qt not recognizing the cnange in DPI.
