Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.2
-
None
Description
I am using the environment variable QT_SCREEN_SCALE_FACTORS="A=1;B=2" to simulate a dual-monitor setup with different scale factors on each monitor. I've found that QWidget::setMask doesn't work properly in this situation.
I have implemented a custom window which calls QWidget::setMask inside QWidget::resizeEvent, to keep the mask up-to-date with the actual widget size. Normally this works fine, however when I move the window to a different monitor with setGeometry, the mask becomes broken. It seems that Qt is internally still using the old scale factor when generating the mask, so it ends up being either 2x too small or too large.
It also seems that Qt makes no attempt to rescale the existing mask if I don't explicitly call QWidget::setMask.