Fixes crash in PaintedItem example when using threaded rendering.
authorYoann Lopes <yoann.lopes@nokia.com>
Wed, 11 May 2011 13:55:01 +0000 (15:55 +0200)
committerYoann Lopes <yoann.lopes@nokia.com>
Wed, 11 May 2011 13:55:01 +0000 (15:55 +0200)
examples/declarative/painteditem/main.cpp

index 10bd430..8502860 100644 (file)
@@ -67,6 +67,10 @@ public:
 
 int main(int argc, char ** argv)
 {
+#ifdef Q_WS_X11
+    QApplication::setAttribute(Qt::AA_X11InitThreads);
+#endif
+
     QApplication app(argc, argv);
 
     qmlRegisterType<MyPaintItem>("MyModule", 1, 0, "MyPaintItem");