Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87871

QMdiSubWindow's window icon size is incorrect for system scaling 150% or more

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 33ddacdd24523acbdafcda0f520dd2d73c879cfb (qt/qtbase/dev) 18fd74c70d38579c1f40f884297df6ece584eeff (qt/qtbase/6.0) cbe0da5975b8bdc7eeea67510bd746b7347ab3fc (qt/qtbase/6.1) 6e29bec7551762efdcc9f33a770448bcf2b4cec4 (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      You can see problen on this picture:

      For get this bug, you can use project ["mdi"|http://example.com] from Qt examples.

      You need add some code to main:

      // code placeholder
      int main(int argc, char *argv[])
      {
          Q_INIT_RESOURCE(mdi);
      
          qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
          QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
      //...
      

      and change scale your system on 150%

       

      Because of the incorect size the main menu height is incorrect

      The problem is probably in qmdisubwindow.cpp in function: QSize ControlLabel::sizeHint()

      The size should probably be affected by pixmap's devicePixelRatio()

      Attachments

        1. mdi icon problem.png
          mdi icon problem.png
          13 kB
        2. qtbug87871_repro.diff
          2 kB
        3. qtbug87871.jpg
          qtbug87871.jpg
          124 kB
        4. qtbug87871.zip
          3 kB

        Issue Links

          Activity

            People

              sorvig Morten Sørvig
              trikrista Aleksandr Degtyarev
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: