Thats right Robert. Thanks a lot for your suggestions I appreciate it.
Thanks Sujan


On Wed, May 8, 2013 at 5:40 PM, Robert Milharcic <
robert.milhar...@ib-caddy.si> wrote:

>  On 8.5.2013 10:16, Sujan Dasmahapatra wrote:
>
> Thanks Robert. It is working fine...
>
>  On the left mouse press I am showing a message using QMessagBox. But on
> the middle mouse press was having pan and right mouse press was having zoom
> in zoom out. How can I retain those functionalities. With this these
> functionalities are gone.
>
>  void CSGraphicsView::mousePressEvent(QMouseEvent *e)
> {
>  if(e->button()==Qt::LeftButton)
>  {
>  QMessageBox msg;
>  msg.setText("Mouse pressed");
>  msg.exec();
>  }
> }
>
>  Call base class implementation in a case where you need to retain
> original functionality:
>
>  void CSGraphicsView::mousePressEvent(QMouseEvent *e)
> {
>  if(e->button()==Qt::LeftButton)
>  {
>  QMessageBox msg;
>  msg.setText("Mouse pressed");
>  msg.exec();
>  }
>         else
>  GLWidget::mousePressEvent(e);
> }
>
> Also, calling frame on paintEvent might not be enough. You should also
> call frame on every user input, on all mouse and keyboard events for
> example... or you can mount a QTimer and make it call frame at some
> interval.
>
> Robert Milharcic
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Thanks & Regards
Sujan
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to