Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.TWrootLocation = self.findChild(QLineEdit, "leTWroot")
- self.btnTWrootLocation = self.findChild(QPushButton, "pbTwLocal")
- self.SOPlocation = self.findChild(QLineEdit, "leSOPLocation")
- self.btnSOPocation = self.findChild(QPushButton, "pbSOPLocation")
- self.DeliveryLocation = self.findChild(QLineEdit, "leDeliveryLocation")
- self.btnDeliveryLocation = self.findChild(QPushButton, "pbDeliveryLocal")
- self.btnTWrootLocation.clicked.connect(lambda state, x=0: self.GeTPath(x))
- self.btnSOPocation.clicked.connect(lambda state, x=1: self.GeTPath(x))
- self.btnDeliveryLocation.clicked.connect(lambda state, x=2: self.GeTPath(x))
- def GeTPath(self, id):
- dialog = QFileDialog()
- folderPath = dialog.getExistingDirectory(None, "Select Folder")
- if id == 0:
- # Setting text
- self.TWrootLocation.setText(folderPath)
- elif id == 1:
- # setting the text
- self.SOPlocation.setText(folderPath)
- elif id == 2:
- # Setting text
- self.DeliveryLocation.setText(folderPath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement