PDA

View Full Version : what is the equal function of pressing right click



KT_HG
30th January 2016, 17:46
i need a function in Qt to do the work of pressing right click on the mouse. is there any function for this?

d_stranz
30th January 2016, 18:25
You make a QMouseEvent instance, set its parameters appropriately, then call QCoreApplication::sendEvent() or QCoreApplication::postEvent(). Note the difference in how the QEvent argument to each of these methods is created.