When the child widget completely fills a parent widget the QPaintEvent  is no 
longer send to the parent. If you have something like this:

connect( &timer, SIGNAL(timeout()),myParent, SLOT(update()) );

 virtual void MyParent::paintEvent(QPaintEvent* event)
 {
    osgViewer->frame();
 }

... the frame will never be called.

Robbert Milharcic

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of jamie robertson
Sent: Wednesday, August 31, 2011 12:00 AM
To: [email protected]
Subject: [osg-users] (Qt) single GraphicsWindowQt completely filling parent 
widget

Hi,

For some reason I'm struggling to get a GraphicsWindowQt (GraphicsWindowQt 
::getGLWidget) to completely fill a parent widget. I've tried various ways and 
always seem to fail (the GraphicsWindowQt isnt displayed) unless there is a non 
zero margin on a layout, in which case it works as expected.

It's the same for setting the mainwidget of a qmainwindow, it doesnt appear 
unless I set a non zero margin.

I can simply reproduce the problem in the osgviewerqt example with the 
following modification:


Code:
QGridLayout* grid = new QGridLayout;
grid->setSpacing(0);
grid->setMargin(0);



Setting either the margin or spacing to something other than zero displays the 
viewers ok.

Anyone encountered this before?

Im using osg 3.0.1, windows7.

Thanks,

Jamie Robertson[/code]

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





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

Reply via email to