exit = QtGui.QAction(QtGui.QIcon(':/log.ico'), 'Exit', self)
exit.setShortcut('Ctrl+Q')
exit.setStatusTip('Exit Application')
self.connect(exit, QtCore.SIGNAL('triggered()'), QtCore.SLOT('close()'))
help = QtGui.QAction(QtGui.QIcon(':/log.ico'), 'Help', self)
help.setShortcut('Ctrl+Q')
menu_bar = self.menuBar()
file1 = menu_bar.addMenu('&File')
file1.addAction(exit)
file1.addAction(help)
pyqt4 menu bar
程序员文章站
2024-02-24 13:35:40
...