2008/10/27 Lukas Diduch <[EMAIL PROTECTED]>:
> Hi Robert,
>
> still no clue what causes the bad window but most probably this is due
> to the sequence of windowing toolkit initialization between qt,osg and
> x11, so looking at GraphicsWindowX11 might be a good idea.
>
> Please ignore the header definition message from my last email, i've
> mistook different file versions. The file was actually ok.
>
> I have updated QOSGWindow due to your recommendations. Playing around
> with it i've found some bugs so changed the widget which contains the
> timer doing calls to CompositeViewer::frame () too.
>
> Unfortunately the mod does not behave as stable as my personal
> applications in terms of number of independent widgets and resizing. The
> reason for this is the workaround due to the timer, which is best
> implemented standalone if using osg's CompositeViewer (no subclassing
> with QWidget) like in the mod. I had bad performance using subclassing
> in this case since we need to use qt's window inheritance. Maybe someone
> can find a better solution to this...
>
> I could see however you guys did quite a job working around to avoid
> usage of the moc (because of cmake ?, usually qmake would call it for
> you).
>
> Please note that if any subclasses of QObject want to implement custom
> slots, which are not built using the moc, the user will get a runtime
> error that slots are not present..  something like this:
>
> Object::connect: No such slot QWidget::update()
>
> In order to use these, the Q_OBJECT macro must be used at the beginning
> of the class declaration.  Doing this, but compiling without moc
> however, will lead to another error message looking something like this:
>
> QOSGWidget.cpp:(.text+0x2028): undefined reference to `vtable for
> QViewerTimer'
>
> I just wanted to mention this because i know (my private apps work quite
> fine) that there is way more performance and stability potential in
> using osg with qt. Unfortunately this cannot be implemented in the
> current example. Maybe you guys can fix this issue by finding a way to
> call the moc from within cmake and implement signals and slots the
> recommended 'QT way'.

That's /easy/ with cmake and Qt4. Here's the setup :
your class MyWidget is declared inside file MyWidget.h and using the
Q_OBJECT macro.
your implementation goes into MyWidget.cpp and includes a non-existent
file called MyWidget.moc.

calling QT4_AUTOMOC(MyWidget.cpp) from the CMakeLists.txt will make
the magic happen...

HTH
---
Mathieu

> I've attached the new version.
>
> Best regards,
> Lukas
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to