For my app I have created a GUI in Qt Designer and converted it into python(2.6) code.
On some of the QPushButton
(created with the designer) I want to add a right click context menu. The menu options depend on the application status.
How to implement such a context menu ?
Check if an example below would work for you. The key thing is to set context menu policy for your widget to CustomContextMenu and connect to the widget's customContextMenuRequested signal: