Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from PySide2 import QtCore, QtGui, QtWidgets
- class Ui_Form(object):
- def setupUi(self, Form):
- Form.setObjectName("Form")
- Form.resize(1266, 798)
- self.treeView = QtWidgets.QTreeView(Form)
- self.treeView.setGeometry(QtCore.QRect(40, 70, 611, 241))
- self.treeView.setObjectName("treeView")
- #-------------
- self.treeView.QFileSystemModel.directoryLoaded('D:testqt')
- #-------------
- self.pushButton = QtWidgets.QPushButton(Form)
- self.pushButton.setGeometry(QtCore.QRect(670, 70, 131, 41))
- self.pushButton.setObjectName("pushButton")
- self.label = QtWidgets.QLabel(Form)
- self.label.setGeometry(QtCore.QRect(40, 42, 541, 21))
- self.label.setObjectName("label")
- self.retranslateUi(Form)
- QtCore.QMetaObject.connectSlotsByName(Form)
- def retranslateUi(self, Form):
- Form.setWindowTitle(QtWidgets.QApplication.translate("Form", "Form", None, -1))
- self.pushButton.setText(QtWidgets.QApplication.translate("Form", "PushButton", None, -1))
- self.label.setText(QtWidgets.QApplication.translate("Form", "TextLabel", None, -1))
- if __name__ == "__main__":
- import sys
- app = QtWidgets.QApplication(sys.argv)
- Form = QtWidgets.QWidget()
- ui = Ui_Form()
- ui.setupUi(Form)
- Form.show()
- sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement