Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMainWindow/QMdiArea minimize, maximize and close buttons are not drawn correctly
QtWS25 Last Chance

QMainWindow/QMdiArea minimize, maximize and close buttons are not drawn correctly

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 926 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adeel Asghar
    wrote on last edited by
    #1

    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
    controls-drawn.png

    Here is how it looks in high resolution e.g, 3840x2160
    controls-not-drawn.png

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What is the difference with regard to the MDI window between the two applications ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Adeel Asghar
        wrote on last edited by
        #3

        No difference. Its the same application under different resolutions on the same PC.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Which version of Qt are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Adeel Asghar
            wrote on last edited by
            #5
            # qmake --version
            QMake version 3.1
            Using Qt version 5.15.1
            
            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              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)?

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Adeel Asghar
                wrote on last edited by
                #7

                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.

                B 1 Reply Last reply
                0
                • A Adeel Asghar

                  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.

                  B Offline
                  B Offline
                  balta1980
                  wrote on last edited by
                  #8

                  @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.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved