Hi,

after reading https://doc.qt.io/qt-5/highdpi.html it is still a bit unclear to me, what is the correct sequence of attribute setting to have proper HiDPI support on the
X11/Windows/macOS platforms (including support for scales like 150%).

At the moment, e.g. in Kate, we try (before we init the QApplication):

    /**
     * enable high dpi support
     */
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);

    /**
     * allow fractional scaling
     */
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif

Is that actually the right way to do it?

Does one actually need the Qt::AA_EnableHighDpiScaling call?
We got some reports that we behave strangely (weird sizes) since we added Qt::AA_EnableHighDpiScaling.

If I miss some example snippet in the documentation, any pointer is welcome ;=)

Greetings
Christoph

--
Ignorance is bliss...
https://cullmann.io | https://kate-editor.org
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to