[osg-users] osg+QT MODKEY How to

legeochen legeochen at gmail.com
Sat Mar 7 18:03:58 PST 2009


Hi Robert
I wrote a ViewerQT class according to the osgviewerQT in examples. Then set
Central Widget of a form to this viewerQT instance.  Is it a proper way to
intergrate ogs and qt? Thanks!
legeo

2009/3/7 Robert Osfield <robert.osfield at gmail.com>

> Hi Legeo,
>
> How are you integrating OSG and QT?
>
> Robert.
>
> On Sat, Mar 7, 2009 at 8:14 AM, legeochen <legeochen at gmail.com> wrote:
> > Hi all,
> >    I'm trying to add a Modkey event handler to my application with osg
> and
> > qt4. But it seems that the getModKeyMask() fuction fails to work. Return
> > value of getModKeyMask() always is 0, even if I have a MODKEY pressed.
> And,
> > this is my code:
> >         if ( ea.getEventType() == osgGA::GUIEventAdapter::PUSH &&
> >              ea.getButtonMask() ==
> osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON
> > &&
> >              ea.getModKeyMask() == osgGA::GUIEventAdapter::MODKEY_SHIFT )
> >          {
> >             /*---------------------------------------------
> >                     do something here
> >             -------------------------------------------------*/
> >         }
> > How can I handle it? Thanks in advance!
> >
> > cheers
> > legeo
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090308/bdf3b09e/attachment-0003.htm>


More information about the osg-users mailing list