1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| class Ui_Dialog1(object):
def setupUi(self, Dialog1):
Dialog1.setObjectName(_fromUtf8("Dialog1"))
Dialog1.resize(474, 337)
self.label = QtGui.QLabel(Dialog1)
self.label.setGeometry(QtCore.QRect(50, 60, 121, 16))
self.label.setObjectName(_fromUtf8("label"))
self.lineEdit = QtGui.QLineEdit(Dialog1)
self.lineEdit.setGeometry(QtCore.QRect(50, 80, 113, 20))
self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
self.pushButton = QtGui.QPushButton(Dialog1)
self.pushButton.setGeometry(QtCore.QRect(190, 80, 75, 23))
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.retranslateUi(Dialog1)
QtCore.QMetaObject.connectSlotsByName(Dialog1)
QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL("clicked()"), self.Folder)
def retranslateUi(self, Dialog1):
Dialog1.setWindowTitle(QtGui.QApplication.translate("Dialog1", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Dialog1", "Please enter the folder : ", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton.setText(QtGui.QApplication.translate("Dialog1", "Ok", None, QtGui.QApplication.UnicodeUTF8))
def Folder(self):
Dossier = self.lineEdit.text()
print Dossier
def WriteFileI1(self):
fichier = open("Chemin saisie par l'utilisateur","a")
fichier.write("Coucou")
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
Dialog1 = QtGui.QDialog()
ui = Ui_Dialog1()
ui.setupUi(Dialog1)
Dialog1.show()
sys.exit(app.exec_()) |
Partager