def initContextMenu(self): m = QMenu() m.addAction( QIcon.fromTheme("application-exit"), "&Quit", qApp.quit) self.s.setContextMenu(m)