qt.conf - Decidedly unclear information on how to set Windows DPI awareness (or anything else).
-
Having font size issues. I am developing an application for a medical device that is using the Liberation Sans font. The application runs on Linux, on what is essentially an embedded device. I am developing on Windows 10 and have no direct access to the device. I have scaling set to 100%. Fonts are appearing proportionally far smaller on my system than on the target or that of my coworkers. All font sizes are set using point size.
I feel certain that if I can get the DPI setting correct, there should not be an issue.
The most promising information I have been able to dig from the scrambled collection of documentation that touches on the subject appears to be a setting for the qt.conf file to set, "dpiawareness", but the documentation is not clear and following the link provided on the first page I read is not helpful.
Wild guess, as there are 14 different qt.conf files on the system, is that I should be editing the one found in the QtCreator bin directory. (Or should it be the one in the ming81_64 bin directory?)
On this page, in the Microsoft Windows section, dpiawareness setting for the qt.conf file is described. Though it does show 3 parameters given, which, as it is not reasonably explained, I presume corresponds to the values for each of the possible states. (Really, wouldn't it be far clearer to describe this in the same way as it is for other programming parameters and provide the value WITH the state description? This presentation really makes it appear as if all 3 parameters are required.) I believe what I want is to insure that a per-monitor awareness is set. (I have 2, and one is over twice the physical dimensions of the other, meaning an averaged setting is worthless.)
https://doc.qt.io/qt-5/highdpi.html
Now on the, "Using qt.conf", page, in the, "Configuring Arguments to the Platform Plugins" (near the bottom), it shows an example for setting a platform plugin argument. Not a very clear example as it does not match that provided on the previous page where the desired parameter is described.
https://doc.qt.io/qt-5/qt-conf.html
Any clarity would be greatly appreciated. Thanks in advance.
-
Having font size issues. I am developing an application for a medical device that is using the Liberation Sans font. The application runs on Linux, on what is essentially an embedded device. I am developing on Windows 10 and have no direct access to the device. I have scaling set to 100%. Fonts are appearing proportionally far smaller on my system than on the target or that of my coworkers. All font sizes are set using point size.
I feel certain that if I can get the DPI setting correct, there should not be an issue.
The most promising information I have been able to dig from the scrambled collection of documentation that touches on the subject appears to be a setting for the qt.conf file to set, "dpiawareness", but the documentation is not clear and following the link provided on the first page I read is not helpful.
Wild guess, as there are 14 different qt.conf files on the system, is that I should be editing the one found in the QtCreator bin directory. (Or should it be the one in the ming81_64 bin directory?)
On this page, in the Microsoft Windows section, dpiawareness setting for the qt.conf file is described. Though it does show 3 parameters given, which, as it is not reasonably explained, I presume corresponds to the values for each of the possible states. (Really, wouldn't it be far clearer to describe this in the same way as it is for other programming parameters and provide the value WITH the state description? This presentation really makes it appear as if all 3 parameters are required.) I believe what I want is to insure that a per-monitor awareness is set. (I have 2, and one is over twice the physical dimensions of the other, meaning an averaged setting is worthless.)
https://doc.qt.io/qt-5/highdpi.html
Now on the, "Using qt.conf", page, in the, "Configuring Arguments to the Platform Plugins" (near the bottom), it shows an example for setting a platform plugin argument. Not a very clear example as it does not match that provided on the previous page where the desired parameter is described.
https://doc.qt.io/qt-5/qt-conf.html
Any clarity would be greatly appreciated. Thanks in advance.
@VFCraig said in qt.conf - Decidedly unclear information on how to set Windows DPI awareness (or anything else).:
Not a very clear example as it does not match that provided on the previous page where the desired parameter is described.
Have your tried the following?
[Platforms] WindowsArguments = dpiawareness=1
-
None of the setting make any difference. Not 0, not 1, not 2. That is, I did set the setting in qt.conf in QtCreator's bin directory, not in the other 13 qt.conf files on the system.
@VFCraig
you shouldn't change any qt.conf files you find on your disk.See https://doc.qt.io/qt-5/qt-conf.html for the default search paths.
just place it next to your executable.Some other approach. Since your actual issue are just different font sizes on Linux and Windows.
Your Linux system might just have a smaller default font size (or none which is adapted to your screen).So try to set a default font: https://doc.qt.io/qt-5/qapplication.html#setFont
Edit: read again, it happens on your machine only?
-
Yes, for some reason, on my machine only. My co-worker does not see the same issue on his machine. Both machines are running Windows 10. I know when he is working at home he has more than one display connected and one is, best guess, a 4k display. My laptop has a 15" display and I also have a 40" display connected, both are 1080p. Both of my displays show text the same. And the text/fonts display smaller on my system (100% scaling in Windows settings, though 125% is Windows "recommended").
And the target system is Linux.
-
Yes, for some reason, on my machine only. My co-worker does not see the same issue on his machine. Both machines are running Windows 10. I know when he is working at home he has more than one display connected and one is, best guess, a 4k display. My laptop has a 15" display and I also have a 40" display connected, both are 1080p. Both of my displays show text the same. And the text/fonts display smaller on my system (100% scaling in Windows settings, though 125% is Windows "recommended").
And the target system is Linux.
@VFCraig I would add that the Liberation Sans font we are using displays the zero character much narrower in width on my system than on the others, and on the character set sample images available on the net. I have installed the same font files as are used on the other systems.
One additional note, I am using 5.15. The others are using 5.14. Though this does not seem the sort of thing impacted by such a minor version change.