[osg-users] Fwd: creating widget for Qt

2009-03-19 Thread ami guru
Hello Ivan,


What is the difference betwen  the AdapterWidget and QOSGWidget.

I found one to be the subclass of GLWidget and the other is QWidget.

Which one is better ?

Any explanation?


Regards
Sajjad


-- Forwarded message --
From: Iván Cuevas 
Date: 2009/3/19
Subject: Re: [osg-users] creating widget for Qt
To: osg-users@lists.openscenegraph.org


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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Fwd: creating widget for Qt

2009-03-17 Thread ami guru
Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h
   AdapterWidget.cpp
   ViewerQT.h
And promoted the widget to the ViewerQT.h

Loading the widget in the mainwindow and can load different model.

And i did not recieve any warning so far.

Yo said that you are having that while paint event(),


Where are you exactly having that paint event() ?


Did you mean that in the AdapterWidget that is the subclass of GLWidget?


Regards
Sajjad

-- Forwarded message --
From: ami guru 
Date: Tue, Mar 17, 2009 at 1:04 PM
Subject: Fwd: [osg-users] creating widget for Qt
To: qt-inter...@trolltech.com


Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h
   AdapterWidget.cpp
   ViewerQT.h
And promoted the widget to the ViewerQT.h

Loading the widget in the mainwindow and can load different model.

And i did not recieve any warning so far.

Yo said that you are having that while paint event(),


Where are you exactly having that paint event() ?


Did you mean that in the AdapterWidget that is the subclass of GLWidget?


Regards
Sajjad



-- Forwarded message --
From: ami guru 
Date: Tue, Mar 17, 2009 at 12:59 PM
Subject: Fwd: [osg-users] creating widget for Qt
To: qt-inter...@trolltech.com


Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h


-- Forwarded message --
From: Iván Cuevas 
Date: 2009/3/16
Subject: Re: [osg-users] creating widget for Qt
 To: osg-users@lists.openscenegraph.org


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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Fwd: creating widget for Qt

2009-03-16 Thread ami guru
Hello Ivan,

In the pro file do i have to include OpenGL module

or just the library linker for Openscenegraph will suffice


Regards
Sajjad

-- Forwarded message --
From: Iván 
Date: Wed, Mar 4, 2009 at 11:27 PM
Subject: Re: [osg-users] creating widget for Qt
To: osg-users@lists.openscenegraph.org


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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org