Incorrect positioning of Popup elements (and its descendants) when using multiple monitors and Windows display scaling
I have a laptop connected to an external monitor. Notebook display resolution 1920x1080, external monitor display resolution 1920x1080. In the display settings of Windows 11, for the built-in display of the laptop, scaling is set to 125%, for the external display, scaling is set to 100% (i.e. actually disabled). The desktop extension mode is set to the right side of the external monitor display.
Next, I create a new Qt Quick Application project in Qt Creator (version 7.0.2). Here is the content of the main.qml file:
Now let's run this application. If the application window is displayed entirely on one display, then when clicking on the window area, the upper left corner of the pop-up menu is displayed near the mouse pointer (if the click coordinates, the dimensions of the main window and the dimensions of the pop-up menu are such that when the upper left corner of the pop-up menu is displayed near the mouse pointer, it does not fit into the application window, then the pop-up menu rests on the bottom or right edge of the main window.). This describes the expected behavior.
The desktop extension mode is set to the right side of the external monitor display.
Now let's try to move the application window to the right partially to the second display. At some point, when most of the window is on the second display, the second display's scaling (which is specified as 100%) will be applied to it, i.e. the application window scaling will be changed from 125% to 100%. As soon as the new scaling is applied, stop moving the application window and try to make a few clicks on the part of the window that remains on the main display (laptop display). Now the pop-up menu is displayed not at all next to the mouse pointer, the pop-up menu is displayed above and to the left of the mouse pointer at some distance from it (except for clicks near the left and top borders of the window).