复制代码 代码如下:
import sys
from PyQt4 import QtGui, QtCore
class Window( QtGui.QMainWindow):
def init(self):
QtGui.QMainWindow.init(self)
self.setWindowTitle('hello')
self.resize(800,500)
menubar = self.menuBar()
self.file = menubar.addMenu('&file')
open = self.file.addAction('open')
self.connect(...