I recently began using the command xrandr --dpi 166
for my new laptop running Ubuntu 16.04.3 64-bit after noticing that otherwise the system automatically uses 96 dpi.
However, such a high dpi setting results in extremely big menus and toolbars only in Qt apps I have, such as Master PDF Editor, digiKam and Krita (the latter two are in AppImage format). Other apps running in Java or WINE environment don't pose such problems.
I'm hoping to find a way of manually entering a specific dpi setting for Qt apps or some other way of resolving this problem.
If there is no way of globally specifying a dpi setting for Qt apps, maybe a simple wrapper script entering xrandr --dpi 96
before and restoring the initial dpi setting after such an app could do as well...
A less than perfect temporary solution that I've found is the following simple wrapper bash script that can be used in the relevant .desktop file instead of the executable of the app in question, e.g.
masterpdfeditor4
:This will restore the original dpi setting only if one such app is opened and closed, or in case more than one such app is launched, only if the first app is closed last.
Secondly, somehow some GUI elements other than menus and toolbars cannot be fixed in this way, e.g. cursor size in Krita workspace...