Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Commit

Permalink
Enable High-DPI support for Qt 5.6 and higher
Browse files Browse the repository at this point in the history
This fixes size hint issues in the event editor on Windows, at
least for me.

Fixes #269

Change-Id: I2a31c9c0aaa4275c17d57ab6e17e84adcb0f1339
Reviewed-on: https://codereview.kdab.com/32523
Tested-by: Continuous Integration <build@kdab.com>
Reviewed-by: Hannah von Reth <hannah.vonreth@kdab.com>
  • Loading branch information
frankosterfeld committed Apr 21, 2016
1 parent e2c5ec8 commit 6d52fc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Charm/Charm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ int main ( int argc, char** argv )
}

try {
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
QGuiApplication::setAttribute( Qt::AA_EnableHighDpiScaling );
#endif
QApplication app( argc, argv );
const std::shared_ptr<ApplicationCore> core( createApplicationCore( startupTask ) );
QObject::connect( &app, SIGNAL(commitDataRequest(QSessionManager&)), core.get(), SLOT(commitData(QSessionManager&)) );
Expand Down

0 comments on commit 6d52fc8

Please sign in to comment.