[osg-users] Qt5 QMdiArea

Émeric MASCHINO emeric.maschino at gmail.com
Tue Aug 18 09:25:42 PDT 2015

Hi Vincent,

> thank you for your reply, I forgot to write that I'm trying this on Linux. Maybe it is an incompatibility problem.

You're welcome. Actually, the same code run without a problem on the
same PC dual-booting Windows 7 Professional and Fedora 21.

> My class works if I use a QWidget (or a QStackedWidget) as container, but not if I use QMdiArea or QTabWidget. So I doubts the problem come from manipulator, scenegraph or camera configuration.
> I would like try with the thread instead of QTimer. What is the library you used (QThread, OpenThread, std/C++11 , pthread, boost ...) ?  How did you proceed? with Qt5 and OSG Threads, the multithreading model doesn't work:
>> Qt5 is currently crashing and reporting "Cannot make QOpenGLContext current in a different thread" when the viewer is run multi-threaded, this is regression from Qt4.

OK, I think I get your point.

I'm not using Qt5, but Qt 4.8.6 at the moment.

My rendering thread inherits from OpenThread (I have a set of various
base classes, shared among various viewer implementations, ranging
from Qt, MFC or FireBreath plug-in).

I have no problem with Qt4 multithreading on Windows, nor on Linux,
unless you omit to specify the Qt::AA_X11InitThreads attribute:

int main(int argc, char *argv[])


    QApplication app(argc, argv);
    app.setOrganizationName("EOS imaging");

    MainWindow mainWin;

#if defined(Q_OS_SYMBIAN)
    return app.exec();


> Vincent[/code]
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64832#64832
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list