Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, June 2007
QGLContext in a separate thread


Message 1 in thread

Hi,
I'm developing an IconGenerator that use Opengl offline context to draw and
produce icon using a separate thread.
This generator must be in a separate thread to doesn't slow down the
application when the icons to be generated are lots.
Internally this generator use a QGLContext, each time I call the its
create() method , QT use a QGLTempContext which is a QWidget.
Just after the creation of QGLTempContext I receive an assertion "Widgets
must be created in the GUI thread".
I know that this widget is created in another thread but I don't want to
create in the GUI thread (using moveToThread) to avoid slow down of the
application.

How I can create a QGLContext in another thread ?
If is not possible, there is some workaround to resolve this kind of issue ?


I'm using QT 4.3 on both Mac (PPC and Intel) and Windows.

Angelo