Right click with mouse
I made a minesweeper game and i want to implement the "put flag" function.
I want to put the flag on a PushButton by right clicking.
How can i implement that?
Some sort of
then put flag"
Override the mouse events and implement the logic.
Is there an example available?
You can overwrite the mouse event of the button "mousePressEvent":http://doc.qt.nokia.com/4.7/qwidget.html#mousePressEvent or install an event Filter for the buttons in you parent class. How to do that, have a look at the documentation. How to do that, "have a look at the docs":http://doc.qt.nokia.com/4.7/qobject.html#installEventFilter
Many thanks :-)