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

Windows: Qt::Popup window has wrong initial size on system with displays with different DPI scales

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0, 6.10.0
    • QPA: Windows
    • None
    • Windows

    Description

      Reproducer is attached.

      To test this you need two monitors. DPI scale of the first monitor is 150%, and DPI scale of the second monitor is 100%. Start the application, drag the widget to the second monitor. Click on the widget and a popup will appear on the first monitor. Notice that the size of the popup is 133x133, not 200x200 as expected.

      If you restart the application and the widget is on the first monitor when you click, the size of the popup is correct (200x200).

      One workaround is to move the popup before showing:

      popup_->move(event->globalPosition().toPoint());
      popup_->show();

       If, instead, the popup is moved after showing, the initial size will also be incorrect.

      Attachments

        For Gerrit Dashboard: QTBUG-134139
        # Subject Branch Project Status CR V

        Activity

          People

            owolff Oliver Wolff
            mauro.persano Mauro Persano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change