qmainwindow

Qt: best way to add a context menu to the central widget?

I do not understand why in the book Rapid GUI Programming with Python and Qt, a context menu is added to a central widget by calling addActions() on the main window (self), like so (p. 180): self.addActions(self.imageLabel, (editInvertAction, …)) where self is a QMainWindow, and imageLabel is a QLabel set as the centra...