Hi. I create a class that its name is Car. Car class has a method .The name of this method Drawcar with openGL. Drawcar method draws the car. when I click mouse right button on the car shape .I want to show a menu .How can I do it Help...
Hi. I create a class that its name is Car. Car class has a method .The name of this method Drawcar with openGL. Drawcar method draws the car. when I click mouse right button on the car shape .I want to show a menu .How can I do it Help...
in the mousePressEvent
chk for the mouse button,
if(event->button()==Qt::Rightbutton)
and add the event
Actually, there's a specialized handler for context menu, namely QWidget::contextMenuEvent(). The actions required to open context menus vary between platforms; for example, on Windows, pressing the menu button or clicking the right mouse button will cause this event to be sent. QWidget::mousePressEvent() would only cover the latter case.
J-P Nurmi
Bookmarks