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

        # create submenu Action .
        extractAction = QtGui.QAction("Help", self)
        extractAction.setShortcut("Ctrl+H")
        extractAction.setStatusTip('Help Your')
        extractAction.triggered.connect(self.help)
        sefl.statusBar()

        # Create maiMenu object of menuBar class
        mainMenu = self.menuBar()
        fileMenu = mainMenu.addMenu('&File')
        fileMenu.addAction(extractAction)

        self.home()
Ejemplo n.º 2
0
    def home(self):
        #1-Create object of btn.
        btn=QtGui.QPushButton("Quit",self)
        # 2-Event perform on btn.
        #old->#btn.clicked.connect(QtCore.QCoreApplication.instance().quit)
        btn.clicked.connect(self.close_app) # Call close_app function.
        # 3-Resize btn.
          #->btn.resize(btn.minimumSizeHind())
          #->btn.resize(btn.sizeHind())
        btn.resize(100,100)
        # 4-Move btn.
        btn.move(100,100)
        # Show the Window

        extractAction = QtGui.QAction(QtGui.QIcon('jio.png'), 'Flee the Scene',self)
        extractAction.triggered.connect(self.close_app)

        self.tooBar = self.addToolBar("Extraction")
        self.Toolbar.addAction(extractAction)

        checkBox = QtGui.QCheckBox('Enlarge Window',self)
        checkBox.move(100,35)
        checkBox.stateChanged.connect(self.enlarge_window)

        self.progress = QtGui.QProgressBar(self)
        self.progress.setGeometry(200,80,250,20)
        self.btn = QtGui.QPushButton("Download",self)
        self.btn.move(200,120)
        self.btn.chlicked.connect(self.download)

        self.show()
Ejemplo n.º 3
0
    def home(self):
        #1-Create object of btn.
        btn = QtGui.QPushButton("Quit", self)
        # 2-Event perform on btn.
        #old->#btn.clicked.connect(QtCore.QCoreApplication.instance().quit)
        btn.clicked.connect(self.close_app)  # Call close_app function.
        # 3-Resize btn.
        #->btn.resize(btn.minimumSizeHind())
        #->btn.resize(btn.sizeHind())
        btn.resize(100, 100)
        # 4-Move btn.
        btn.move(100, 100)
        # Show the Window

        extractAction = QtGui.QAction(QtGui.QIcon('jio.png'), 'Flee the Scene',
                                      self)
        extractAction.triggered.connect(self.close_app)

        self.tooBar = self.addToolBar("Extraction")
        self.Toolbar.addAction(extractAction)

        self.show()
Ejemplo n.º 4
0
 def home(self):
     #1-Create object of btn.
     btn = QtGui.QPushButton("Quit", self)
     # 2-Event perform on btn.
     #old->#btn.clicked.connect(QtCore.QCoreApplication.instance().quit)
     btn.clicked.connect(self.close_app)  # Call close_app function.
     # 3-Resize btn.
     #->btn.resize(btn.minimumSizeHind())
     #->btn.resize(btn.sizeHind())
     btn.resize(100, 100)
     # 4-Move btn.
     btn.move(100, 100)
     # Show the Window
     self.show()
Ejemplo n.º 5
0
    def home(self):
        #1-Create object of btn.
        btn = QtGui.QPushButton("Quit", self)

        # 2-Event perform on btn.
        btn.clicked.connect(QtCore.QCoreApplication.instance().quit)

        # 3-Resize btn.
        btn.resize(100, 100)

        # 4-Move btn.
        btn.move(100, 100)

        # Show the Window
        self.show()
Ejemplo n.º 6
0
def run():
    app = QtGui.QApplication(sys.argv)
    GUI = Window()
    sys.exit(app.exec_())
Ejemplo n.º 7
0
 def __init__(self):
     super(Window, self).__init__()
     self.setGeometry(50, 50, 500, 300)
     self.setWindowTitle("Python PyQt")
     self.setWindowIcon(QtGui.QIcon('pythonlogo.png'))
     self.home()
Ejemplo n.º 8
0
'''

    ## Use PyQt with Oops (Object Oriented) ##


'''

import sys
from PyQ4 import QtGui


class Window(QtGui.QMainWindow):
    def __init__(self):
        super(Window, self).__init__()
        self.setGeometry(50, 50, 500, 300)
        self.setWindowTitle("Python PyQt")
        self.setWindowIcon(QtGui.QIcon('pythonlogo.png'))
        self.show()


app = QtGui.QApplication(sys.argv)
GUI = Window()
sys.exit(app.exec_())