On my 14" laptop that is p1080 I can run xdpyinfo and get:
resolution: 157x155 dots per inch
and my KDE looks great, monitor kcm set to 100%, nothing wrong.
Yet, when I start a Qt6 app, the window it opens is far too large. Googling leads me to the suggestion and this solves the issue:
export QT_SCREEN_SCALE_FACTORS=‘eDP=1.2’
Now, why it is smaller when I set the factor to 1.2 than when it is set to 1.0, I don’t understand. But I don’t ask questions if this works.
Problem is that I’ve tried to set this variable in various places and nothing helps starting apps from krunner or plasma actually not show up like the factor was set to 1, which is. Much too large. (ps, yes, I did log out and in again)
Have you tried from a konsole window? That’s th more direct way to test if setting that variable works and how.
Suppose you want to run myqt6.app, which is in your PATH, from a konsole window:
export QT_SCREEN_SCALE_FACTORS=eDP=1.2
myqt6.app
Then close the app and reopen with a different setting, say:
export QT_SCREEN_SCALE_FACTORS=eDP=0.8
myqt6.app
And so on.
Once you find a comfortable value for QT_SCREEN_SCALE_FACTORS you may set it globally, like from a file in /etc/profile.d/ (as root user), e.g.:
su - ## input root's password
## replace 1.2 below with your desired value
cat > /etc/profile.d/qt_scale_factors.sh <<EOF
export QT_SCREEN_SCALE_FACTORS=eDP=1.2
EOF
chmod +x /etc/profile.d/qt_scale_factors.sh
logout ## go back to normal user
After that, a reboot is probably required to make it work, which you can test again from a konsole window:
echo $QT_SCREEN_SCALE_FACTORS
That should print the value you set in the profile.d script, e.g.:
To expand on that, On Wayland, we now automatically choose a scale factor for your screens based on their DPI value and form factor. But obviously sizing is a rather personal topic, and there’s no way we can satisfy everyone with the default value; some people prefer things smaller and more information-dense, and others prefer them larger and more readable.
If you’d like to change the scale factor to a value different from what the system has chosen automatically, do it in System Settings > Display and Monitor.