Fixes crash in PaintedItem example when using threaded rendering.

This commit is contained in:
Yoann Lopes 2011-05-11 15:55:01 +02:00
parent 7ab1f9834f
commit 9e037dae27
1 changed files with 4 additions and 0 deletions

View 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");