Hi again, I forgot to mention that I'm trying to achieve this in Windows 7 64 bits, with a MingW compiler. Qt version is 4.8 and OSG is 3.0.1.
Cheers! 2013/3/12 Adri CS <[email protected]> > Hi everyone, > I'm trying to modify the osgViewerQt example by adding a new class of my > own that will contain the viewer. The design is: > > - *wrapper.h*: Defines class *Wrapper*. It inherits from *QMainWindow*and > has a > *QDockWidget* where the *ViewerWidget* will be attached. > - *viewer.h: *Defines *ViewerWidget* class. It's the class from the > example, with a few mods by me. > - *prueba_osg.cpp: * > Main function and where a QApplication is created. A Wrapper object is > created here. > > The project compiles, but when I execute it, I get an error: > > *QWidget: Must construct a QApplication before a QPaintDevice* > > If I remove the *Q_OBJECT* line, the signal and the slot from *wrapper.h*and > compile the files from the terminal using > > *g++ -IE:/osg-3.0.1/install/include -LE:/osg-3.0.1/install/bin > -IC:/Qt64/4.8/include -LC:/Qt64/4.8/bin -losgViewer -lOpenThreads -losgDB > -losg -losgGA -losgQt -lQtCore4 -lQtGui4 prueba_qt.cpp* > > I can execute the app. > > Can you please tell me what can I do to make this work? I've struggling > all morning but couldn't find the solution. > > Thanks for your time! > ... > PS: Attached to this post are the files I used in this project, including > the pro file from qmake. >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

