>  Scene disappearing by resizing to minimum still needs to be fixed...

I solved this by setting width and height to at least on pixel in the
AdapterWidget::resizeGL( int width, int height ) function.


2008/3/25 Robert Osfield <[EMAIL PROTECTED]>

> Hi Tomas,
>
> Thanks for the changes.  I've merged them and have checked them in to SVN.
>
> I have also tried osgviewerQT --QOSGWidget --mdi  cow.osg but don't
> spot any differences, should I expect any?
>
> I also tried making the window as small as possible but don't hit up
> against any problems.  The QT window under Linux doesn't allow to make
> it a really small size though, perhaps this is different under
> Windows.  Are there other issues still outstanding?
>
> Longer term I'd like to see QT support introduced as an option in the
> headers of include/osgViewer/api.  My thought was to provide something
> like QOSGWidget that people could reuse.  Alas I haven't had time to
> go try this out though, and my QT experience is still pretty limited.
>
> Robert.
>
> On Fri, Mar 21, 2008 at 2:35 PM, Tomas Hnilica
> <[EMAIL PROTECTED]> wrote:
> > Hello Robert,
> >
> >  the problem of keypress events was solved by QT community, attached is
> >  repaired AdapterWidget.cpp file.
> >  In the AdapterWidget class constructor following line was added:
> >  setFocusPolicy(Qt::ClickFocus);
> >  Scene disappearing by resizing to minimum still needs to be fixed...
> >
> >  Cheers,
> >  Tomas
> >
> >
> >  Tomas Hnilica napsal(a):
> >
> >
> > > Robert,
> >  >
> >  > sorry for problematic post.
> >  > Attached is modified source of AdapterWidget.cpp file from osgviewerQT
> >  > example. Original was token today from SVN - trunk. (2.3.6).
> >  > --mdi option needs to be set to run MDI version.
> >  >
> >  > Few notes:
> >  > - tested on Windows box (Win XP)
> >  > - using QT4
> >  > - I was not able to execute the example with QOSGWidget  - had same
> >  > error like described in [osg-users] "fate error using QOSGWidget in
> >  > develop release
> >  > 2.3.0" thread from Shuxing Xiao, 2008-01-08.
> >  > - problems are described in source
> >  >
> >  > Cheers,
> >  > Tomas
> >  >
> >  >
> >  >
> >  >>>
> >  >>>> HI Tomas,
> >  >>>>
> >  >>>  >
> >  >>>  > I can't think of what might be amiss without trying it out.
> >  >>>  >
> >  >>>  > Could modify the osgviewerQT example so that it has another
> optional
> >  >>>  > code path in creating a viewer based on your code.  This will
> allow
> >  >>>  > others to try out your usage model and see first hand what is
> wrong.
> >  >>>  > I can also merge these changes so we can use it as a unit test in
> >  >>>  > future - and getting it working too obviously :-)
> >  >>>  >
> >  >>>  > Robert.
> >  >>>  >
> >  >>>  > On Thu, Mar 20, 2008 at 11:07 AM, Tomas Hnilica
> >  >>>  > <[EMAIL PROTECTED]> wrote:
> >  >>>  >
> >  >>>  >> Hello all OSG users,
> >  >>>  >>
> >  >>>  >>  I found few issues by intergration OSG(2.2.0) with QT (4.3.3) :
> >  >>>  >>  The ViewerQT class from OSG-2.2.0 works well in the
> >  >>> osqviewerQT.cpp
> >  >>>  >>  example.
> >  >>>  >>  But when I add it to existing QT window, I have these problems:
> >  >>>  >>  - no keyboard actions are emitted to OSG, mouse works ok
> >  >>>  >>  - when resizing the MDI window to minimum (like with minimize
> >  >>> button,
> >  >>>  >>  but done as resizing) the scene disappears by resizing back.
> >  >>>  >>
> >  >>>  >>  I changed the osgviewerQT example by replacin the
> >  >>> viewerWindow->show();
> >  >>>  >>  with these code:
> >  >>>  >>  -------------------------------------------
> >  >>>  >>        ViewerQT* viewerWindow = new ViewerQT;
> >  >>>  >>        viewerWindow->setCameraManipulator(new
> >  >>> osgGA::TrackballManipulator);
> >  >>>  >>        viewerWindow->setSceneData(loadedModel.get());
> >  >>>  >>
> >  >>>  >>        QMainWindow* mw = new QMainWindow();
> >  >>>  >>        QMdiArea* mdiArea = new QMdiArea(mw);
> >  >>>  >>        mw->setCentralWidget(mdiArea);
> >  >>>  >>
> >  >>>  >>        QMdiSubWindow *subWindow =
> >  >>> mdiArea->addSubWindow(viewerWindow);
> >  >>>  >>        subWindow->resize(200,100);
> >  >>>  >>        subWindow->showNormal();
> >  >>>  >>        subWindow->setWindowTitle("New Window");
> >  >>>  >>        mw->show();
> >  >>>  >>  -------------------------------------------
> >  >>>  >>
> >  >>>  >>
> >  >>>  >>  I hope these problems are more OSG than QT related...
> >  >>>  >>
> >  >>>  >>  Many thanks,
> >  >>>  >>  Tomas
> >  >>>  >>
> >  >
> >  >
> >  >
> >  >
> >  >
> ------------------------------------------------------------------------
> >  >
> >  > _______________________________________________
> >  > osg-submissions mailing list
> >  > [email protected]
> >  >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >  >
> >
> >
> >  --
> >  S pozdravem
> >     Mgr. Tomas Hnilica
> >
> >  =================================
> >  e-mail: [EMAIL PROTECTED]
> >  jabber: [EMAIL PROTECTED]
> >  skype:  tomashnilica
> >  icq:    339070
> >  tel.:   +420 604 214 284
> >  web:    http://tomas.webstep.net
> >  =================================
> >
> >
> > _______________________________________________
> >  osg-submissions mailing list
> >  [email protected]
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to