Hi,
I'm trying to add a right-click menu on a pushButton, but the menu doesn't show up??
Anyone to help?
def addChannelsMenu(self):
chmenu.addAction('testing')
chmenu.addAction('testing1')
chmenu.addSeparator()
chmenu.addAction('testing2')
#self.channelsBtn.setMenu(chmenu)
#self.channelsBtn.showMenu()
self.zoomBtn.setMenu(chmenu)
def addChannelsMenu(self):
chmenu = QtGui.QMenu()
chmenu.addAction('testing')
chmenu.addAction('testing1')
chmenu.addSeparator()
chmenu.addAction('testing2')
#self.channelsBtn.setMenu(chmenu)
#self.channelsBtn.showMenu()
self.zoomBtn.setMenu(chmenu)
To copy to clipboard, switch view to plain text mode
I tried repainting but it wouldn't help either:
self.zoomBtn.repaint()
self.zoomBtn.repaint()
To copy to clipboard, switch view to plain text mode
I'm on Fedora8 at the moment.
Bookmarks