Ejemplo n.º 1
0
    def __init__(self):
        super(Window, self).__init__()
        self.setGeometry(50, 50, 500, 300)
        self.setWindowTitle("GUI Interface")
        self.setWindowIcon(QtGui.QIcon('pyicon.png'))

        extractAction = QtGui.QActionEvent('exit', self)
        extractAction.setShortcut("Ctrl+Q")
        extractAction.setStatusTip("Leave the app")
        extractAction.triggered.connect(self.close_application)

        self.statusBar()

        mainMenu = self.menuBar()
        fileMenu = mainMenu.addMenu('File')
        fileMenu.addAction(extractAction)

        self.home()