From 9e037dae270a8879499e53e453bb0176bb19196a Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Wed, 11 May 2011 15:55:01 +0200 Subject: [PATCH] Fixes crash in PaintedItem example when using threaded rendering. --- examples/declarative/painteditem/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/declarative/painteditem/main.cpp b/examples/declarative/painteditem/main.cpp index 10bd4302c9..85028600be 100644 --- a/examples/declarative/painteditem/main.cpp +++ b/examples/declarative/painteditem/main.cpp @@ -67,6 +67,10 @@ class MyPaintItem : public QSGPaintedItem int main(int argc, char ** argv) { +#ifdef Q_WS_X11 + QApplication::setAttribute(Qt::AA_X11InitThreads); +#endif + QApplication app(argc, argv); qmlRegisterType("MyModule", 1, 0, "MyPaintItem");