标签:style blog http io ar sp on 2014 log
# -*- coding: cp936 -*-
import sys
from PyQt4 import QtGui,QtCore
class MainWindow(QtGui.QMainWindow):
def __init__(self,parent=None):
QtGui.QMainWindow.__init__(self,parent)
self.setWindowTitle(u‘菜单栏‘)
self.resize(250,150)
exit=QtGui.QAction(QtGui.QIcon(‘f:\\1.jpg‘),‘Eixt‘,self)
exit.setShortcut(‘Ctrl+Q‘)
exit.setStatusTip(‘Eixt Application‘)
exit.connect(exit,QtCore.SIGNAL(‘trigger()‘),QtGui.qApp,
QtCore.SLOT(‘quit()‘))
self.statusBar()
menubar=self.menuBar()
file=menubar.addMenu(‘&File‘)
file.addAction(exit)
app=QtGui.QApplication(sys.argv)
main=MainWindow()
main.show()
sys.exit(app.exec_())
img:
标签:style blog http io ar sp on 2014 log
原文地址:http://www.cnblogs.com/mhxy13867806343/p/4156319.html