Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. from PySide2 import QtCore, QtGui, QtWidgets
  4.  
  5. class Ui_Form(object):
  6.  
  7. def setupUi(self, Form):
  8. Form.setObjectName("Form")
  9. Form.resize(1266, 798)
  10. self.treeView = QtWidgets.QTreeView(Form)
  11. self.treeView.setGeometry(QtCore.QRect(40, 70, 611, 241))
  12. self.treeView.setObjectName("treeView")
  13. #-------------
  14. self.treeView.QFileSystemModel.directoryLoaded('D:testqt')
  15. #-------------
  16. self.pushButton = QtWidgets.QPushButton(Form)
  17. self.pushButton.setGeometry(QtCore.QRect(670, 70, 131, 41))
  18. self.pushButton.setObjectName("pushButton")
  19. self.label = QtWidgets.QLabel(Form)
  20. self.label.setGeometry(QtCore.QRect(40, 42, 541, 21))
  21. self.label.setObjectName("label")
  22.  
  23. self.retranslateUi(Form)
  24. QtCore.QMetaObject.connectSlotsByName(Form)
  25.  
  26. def retranslateUi(self, Form):
  27. Form.setWindowTitle(QtWidgets.QApplication.translate("Form", "Form", None, -1))
  28. self.pushButton.setText(QtWidgets.QApplication.translate("Form", "PushButton", None, -1))
  29. self.label.setText(QtWidgets.QApplication.translate("Form", "TextLabel", None, -1))
  30.  
  31.  
  32. if __name__ == "__main__":
  33. import sys
  34. app = QtWidgets.QApplication(sys.argv)
  35. Form = QtWidgets.QWidget()
  36. ui = Ui_Form()
  37. ui.setupUi(Form)
  38. Form.show()
  39. sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement