Re: [osg-users] creating widget for Qt

2009-03-19 Thread Martin Beckett
I asked the same question last year - here is the answer 
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16305.html

With QT4.5 I am having to use Adapterwidget because I get a recursive redraw 
with QOSGWidget which I haven't been able to fix yet.
QOSGWidget does work if you switch to the (experimental) Opengl rendering 
backend with QT but then the rest of the app draws very slowly.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] creating widget for Qt

2009-03-19 Thread Iván Cuevas
Hi Sajjad,
The warnigs are because I'm rendering in a QWidget out of the paint event. 
These warnings doesn't appear if you render in a QGLWidget, but the 
CompositeViewer framework with multiple OSG views in different widgets and 
multi-threaded does no render properly (at least for me [Crying or Very sad] )

Recently I moved to Qt 4.5.0 and I had a new problem with undesired repaint 
event when the OSG widget lost the focus. For example when a modal dialog is 
shown, my QWidget embbeding the osg::View is repainted with the background 
color and the content are removed until the osg widget recovers the focus and 
is repainted again.
I solved this problem using QWidget::setUpdatesEnabled(false) but still I have 
the problem of the warnings.

I think is not the same situation than yours because you are extending from 
AdapterWidget, but tell if you discover something ;)

Regards,
Iván

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] creating widget for Qt

2009-03-16 Thread Iván Cuevas
I don't use .pro files, but I have to include the OpenGL module because I 
extend from QGLWidget.

Regards,
Iván.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] creating widget for Qt

2009-03-04 Thread Iván
Hi Sajjad,

Personally I create the whole interface in Qt designer and leave the OSG 
widget/s integration in the initialization code.

About the header file, I 've separated the code from the original OSG file in 
my own files (.h and .cpp) As you can see in the Qt sample you have different 
options to render OSG in a Qt widget.

This works for me except for some warnings because of rendering out of QPainter 
events, but I will deal with this later :)

I hope this help you in some way,
Iván.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] creating widget for Qt

2009-03-04 Thread ami guru
Hello forum,

I would like to create a viewer widget for osg using the Qt designer.

To promote it i need the corresponding header file to that.

As  i see in the source you have the class declaration and definition in a
sigle .cpp file.

Do  i have  to separate them or the header file is located somewhere else
that i did not find.


Any hint?


Regards
Sajjad
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org