QMainWindow/QMdiArea minimize, maximize and close buttons are not drawn correctly
-
wrote on 28 Apr 2021, 14:46 last edited by
I have an application that has QMainWindow containing QMdiArea. The minimize, maximize and close control buttons of the QMdiSubWindow are not drawn correctly for higher resolution. If I lower the resolution the controls are drawn.
Here is how it looks in low resolution e.g., 2048x1152
Here is how it looks in high resolution e.g, 3840x2160
The control buttons function as expected. Its just that they are not rendered.
I also made an example application to reproduce the issue. However, the issue is only in my actual application. The example application works fine. Wondering if anyone has any clue what could be the reason for that?
-
Hi,
What is the difference with regard to the MDI window between the two applications ?
-
wrote on 29 Apr 2021, 06:36 last edited by
No difference. Its the same application under different resolutions on the same PC.
-
Which version of Qt are you using ?
-
wrote on 30 Apr 2021, 13:02 last edited by
# qmake --version QMake version 3.1 Using Qt version 5.15.1
-
Lifetime Qt Championwrote on 30 Apr 2021, 14:46 last edited by Christian Ehrlicher
Simplify your application until the icons are rendered correctly.
/edit: do you maybe set Qt::AA_UseHighDpiPixmaps (or do not set in your test app)?
-
wrote on 5 May 2021, 07:33 last edited by
Setting/unsetting
Qt::AA_UseHighDpiPixmaps
doesn't make any difference. I am already using the flagQt::AA_EnableHighDpiScaling
. I even tried disabling it and it doesn't make any difference.Btw, if I set the style to
fusion
usingsetStyle("fusion");
the controls are shown fine. -
Setting/unsetting
Qt::AA_UseHighDpiPixmaps
doesn't make any difference. I am already using the flagQt::AA_EnableHighDpiScaling
. I even tried disabling it and it doesn't make any difference.Btw, if I set the style to
fusion
usingsetStyle("fusion");
the controls are shown fine.wrote on 2 Apr 2023, 23:01 last edited by@Adeel-Asghar I have same trouble I am using Qt Designer 5.11.1, I follow your recommendation of using "fusion" now in order to fix this.