[Qt-interest] ASSERT: "qApp && qApp->thread() == QThread::currentThread"
Wasilios Goutas
wasili at goutas.de
Tue May 26 15:57:21 CEST 2009
Hi,
I'm new to QT and have a basic question.
I use the ACE framework and wrote some libs wich analyses files and send
vektor informations wich I try to visualize using OpenGL inside QT.
The libraries contains so called tasks which creates diferent threads.
One of this threads inherits from QGLWidget and implements the
paintGL() function.
By now, I created the QApplication instance in the main thread, the
QMainWindow and its GLWidget instances inside my visualization library
wich sends OpenGL command in a separete worker thread.
This results in the assertion
ASSERT: "qApp && qApp->thread() == QThread::currentThread()" in file
kernel/qapplication_win.cpp, line 902
when my paintGL() function is called.
Also when I instantiated the QMainWindow object in the main thread I get
this assertion.
It seems to me, that the thread initializd the QApplication instance has
also to be the thread with owns the instance of the used widgets.
Is this right?
bye
Wasili
More information about the Qt-interest-old
mailing list