Exemple #1
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        self.fileDialog = QtGui.QFileDialog(self)

        self.ui.pushButton.clicked.connect(self.helloworld)
Exemple #2
0
class MyForm(QtGui.QMainWindow):

    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        self.fileDialog = QtGui.QFileDialog(self)

        self.ui.pushButton.clicked.connect(self.helloworld)

    def helloworld(self):
        filepath = str(QFileDialog.getOpenFileName())
        print "Generating hex file for " , filepath
        # pixmap = QPixmap(filepath)
        # self.ui.label.setPixmap(pixmap)
        imgtool(filepath)
        pixmap = QPixmap("Greyscale.jpg")
        self.ui.label.setPixmap(pixmap)