QMainWindow/QMdiArea minimize, maximize and close buttons are not drawn correctly
-
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 ?
-
No difference. Its the same application under different resolutions on the same PC.
-
Which version of Qt are you using ?
-
# qmake --version QMake version 3.1 Using Qt version 5.15.1
-
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)?
-
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. -
@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.