Unsolved Font scale display problem under windows 8.1 /10, Qt5.3.2
-
Hi,
I have made a software with Qt5.3.2 under Windows 7. the software runs under windows 8.1 and windows 10 too.But on two laptops with windows 8.1 and windows 10 we had a problem with the font scale display of this software because the font scale display was at 125% on these laptops.We set the display at 100 % and the problem was solved.On my developpement pc (windows 7) the display is at 100%.
can I solve this problem by using Qt5.6 instead of Qt5.3.2 and/or using a Qt or win32 function ? or is there any solution and the user must put the font scale display at 100% on each pc ? -
Hi
Qt 5.6 has better support for high DPI
http://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-6/You can maybe use QT_AUTO_SCREEN_SCALE_FACTOR
or other features to tweak your app.Since its due to the font scale and not so much DPI, its not
just upgrade and it cures all -- .. but you get better toolbox. :) -
Ok,
thank you mrjj.
I will try it with Qt5.6 and with this funtionality.
But I have another question: I have looked at the documentation and should I use a class that derivate from QGuiApplication or can I use a class that derivates from QApplication to use this environnement variable ?
best regards -
OK QApplication derivates from QGuiApplication so there is no problem.
I will try it with Qt 5.6 and come back if it solves my problem partially or totally.. -
oh, can i see what you have found?
I was/am not aware any requirements using QGuiApplication/QApplication
Update: oK :) -
Yes I have seen that with Qt5.6 and the environment variable QT_AUTO_SCREEN_SCALE_FACTOR or by using QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); it can perhaps solve my problem.
So I will try this.... -
well it will at least do something to your fonts :)
-
No,
I have just tested with Qt5.6 and QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); and it doesn't solve the problem of the font... -
but does it react to QT_AUTO_SCREEN_SCALE_FACTOR ?
did anything happen? -
No It doesn't react, if I do set QT_AUTO_SCREEN_SCALE_FACTOR=1 and I run the program, the font is too big with font scale display =125%
-
I think we must tell the user to put 100% as font scale display....