Skip to content

Commit d7274f1

Browse files
gonwanu-235
authored andcommitted
Enable hidpi icon and fractional scaling.
1 parent cb2f77b commit d7274f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ void fallbackFonts()
102102

103103
int main( int argc, char** argv )
104104
{
105-
#if QT_VERSION >= 0x050600
105+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
106106
/* Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created. */
107-
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
107+
QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling );
108+
QCoreApplication::setAttribute( Qt::AA_UseHighDpiPixmaps );
109+
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
110+
QGuiApplication::setHighDpiScaleFactorRoundingPolicy( Qt::HighDpiScaleFactorRoundingPolicy::PassThrough );
111+
#endif
108112
#endif
109113

110114
#if defined (USE_KDE)

0 commit comments

Comments
 (0)