Qt6 topics merged with General

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?

  • Lifetime Qt Champion


    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.

  • Lifetime Qt Champion

    Which version of Qt are you using ?

  • # qmake --version
    QMake version 3.1
    Using Qt version 5.15.1

  • Lifetime Qt Champion

    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 flag Qt::AA_EnableHighDpiScaling. I even tried disabling it and it doesn't make any difference.

    Btw, if I set the style to fusion using setStyle("fusion"); the controls are shown fine.

Log in to reply