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
最新推荐文章于 2019-07-28 12:03:12 发布