Skip to content

Commit

Permalink
Force threaded run loop for QML
Browse files Browse the repository at this point in the history
Fixes high CPU load
  • Loading branch information
Martin Briza committed Sep 22, 2016
1 parent 1829640 commit 63492f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/main.cpp
Expand Up @@ -53,6 +53,10 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS

int main(int argc, char **argv)
{
#ifdef __linux
setenv("QSG_RENDER_LOOP", "threaded", 1);
#endif

qInstallMessageHandler(myMessageOutput); // Install the handler
QApplication app(argc, argv);

Expand Down

0 comments on commit 63492f4

Please sign in to comment.