# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UThroughTrain4\L4.ui' # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(113, 119) Form.setStyleSheet("background-color: rgb(85, 170, 255);") self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.tableWidget = BaseTable(Form) self.tableWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.tableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(1) self.tableWidget.setRowCount(3) item = QtWidgets.QTableWidgetItem() self.tableWidget.setVerticalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setVerticalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setVerticalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() item.setTextAlignment(QtCore.Qt.AlignCenter) self.tableWidget.setItem(0, 0, item) item = QtWidgets.QTableWidgetItem() item.setTextAlignment(QtCore.Qt.AlignCenter) self.tableWidget.setItem(1, 0, item) item = QtWidgets.QTableWidgetItem() item.setTextAlignment(QtCore.Qt.AlignCenter) self.tableWidget.setItem(2, 0, item) self.tableWidget.horizontalHeader().setVisible(False) self.tableWidget.verticalHeader().setVisible(False) self.tableWidget.verticalHeader().setHighlightSections(True) self.verticalLayout.addWidget(self.tableWidget) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "Form")) item = self.tableWidget.verticalHeaderItem(0) item.setText(_translate("Form", "1")) item = self.tableWidget.verticalHeaderItem(1) item.setText(_translate("Form", "2")) item = self.tableWidget.verticalHeaderItem(2) item.setText(_translate("Form", "3")) item = self.tableWidget.horizontalHeaderItem(0) item.setText(_translate("Form", "新建列")) __sortingEnabled = self.tableWidget.isSortingEnabled() self.tableWidget.setSortingEnabled(False) item = self.tableWidget.item(0, 0) item.setText(_translate("Form", "地域分析")) item = self.tableWidget.item(1, 0) item.setText(_translate("Form", "实时数据")) item = self.tableWidget.item(2, 0) item.setText(_translate("Form", "标签工具")) self.tableWidget.setSortingEnabled(__sortingEnabled) from BaseElement import BaseTable 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_())