You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UI of QGIS is not scaled properly on Windows 10 when using a high DPI laptop screen with an additional external monitor.
Steps to reproduce the issue
Install and run QGIS with 4K high DPI screen.
Versions
All versions up to 3.26
Supported QGIS version
I'm running a supported QGIS version according to the roadmap.
New profile
I tried with a new QGIS profile
Additional context
The DevicePixelRatio of the 4K screen does not seems to be set correctly in QGIS as we can see in this comparison of QGIS console output and the standalone DprGadget provided by QT:
This appears to me that this is due to the fact that the flag AA_EnableHighDpiScaling is not set before the creation of the QApplication. This seems to be set by default in QT6 but not in QT5.
I am able to get everything working as expected by setting this manually and running QGIS in windows console:
set QT_ENABLE_HIGHDPI_SCALING=1
C:\OSGeo4W\bin\qgis-bin.exe
In addition, it is useful to also set : QT_SCALE_FACTOR_ROUNDING_POLICY=passthrough
This is necessary as my windows scaling factor is not an integer (250%). Otherwise, the DevicePixelRatio for my High DPI screen is round up to 3 instead of 2.5 which makes the icons look a little too big. QT documentation mention that setting non integer scaling factor can cause issues with some styles, but in my case I have not seen any problem so far.
The text was updated successfully, but these errors were encountered:
jbp35
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
Aug 12, 2022
I have indeed the same issue on my 4K laptop screen. However, #40274 does not cover scaling issue on external monitor which is the most annoying part for me as it is my primary display.
jbp35
changed the title
Incorrect UI scaling on DPI laptop screen with an external monitor
Incorrect UI scaling with high DPI laptop screen
Aug 20, 2022
What is the bug or the crash?
The UI of QGIS is not scaled properly on Windows 10 when using a high DPI laptop screen with an additional external monitor.
Steps to reproduce the issue
Install and run QGIS with 4K high DPI screen.
Versions
All versions up to 3.26
Supported QGIS version
New profile
Additional context
The DevicePixelRatio of the 4K screen does not seems to be set correctly in QGIS as we can see in this comparison of QGIS console output and the standalone DprGadget provided by QT:
This appears to me that this is due to the fact that the flag AA_EnableHighDpiScaling is not set before the creation of the QApplication. This seems to be set by default in QT6 but not in QT5.
I am able to get everything working as expected by setting this manually and running QGIS in windows console:
In addition, it is useful to also set :
QT_SCALE_FACTOR_ROUNDING_POLICY=passthrough
This is necessary as my windows scaling factor is not an integer (250%). Otherwise, the DevicePixelRatio for my High DPI screen is round up to 3 instead of 2.5 which makes the icons look a little too big. QT documentation mention that setting non integer scaling factor can cause issues with some styles, but in my case I have not seen any problem so far.
The text was updated successfully, but these errors were encountered: