Hi,
the problem was that I was mixing debug and release libraries and QtCreator 
didn't like that. I recompiled OSG in debug mode and the problem disappeared.

Thanks for your time,

Adrián.


robertosfield wrote:
> Hi Adrian,
> 
> I'm afraid I can't help directly as I'm not a Qt expert and don't use
> Windows at all.
> 
> A quick run through the thread the only thing I can really add is that
> the problems seem largely down to Qt build issues rather than specific
> OSG integration so perhaps it would be most helpful to look at Qt
> forums/documentation/examples for inspiration.
> 
> Robert.
> 
> On 12 March 2013 13:52, Adrián López <> wrote:
> 
> > 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: SO is Windows 7 64 bits # MingW compiler # Qt 4.8 # OSG 3.0.1
> > 
> > PS2: Attached to this post are the files I used in this project, including 
> > the pro file from qmake.
> > 
> > ------------------
> > Post generated by Mail2Forum
> > 
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=53050#53050
> > 
> > 
> > 
> > 
> > Attachments:
> > http://forum.openscenegraph.org//files/prueba_osg_983.pro
> > http://forum.openscenegraph.org//files/wrapper_994.cpp
> > http://forum.openscenegraph.org//files/prueba_qt_139.cpp
> > http://forum.openscenegraph.org//files/wrapper_153.h
> > http://forum.openscenegraph.org//files/viewer_100.h
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> > 
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53318#53318





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to