# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QObject, pyqtSignal
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
class Ui_MainWindow(object):
# 初始化窗体方法
def setupUi(self, MainWindow):
# 设置窗口名
MainWindow.setObjectName("MainWindow")
# 设置窗口大小
MainWindow.resize(1000, 888)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
self.pushButton.setGeometry(QtCore.QRect(20, 20, 220, 80))
AttributeError: ‘QTreeView‘ object has no attribute ‘setHeaderLabel‘解决办法
项目场景:# -*- coding: utf-8 -*-# Form implementation generated from reading ui file 'untitled.ui'## Created by: PyQt5 UI code generator 5.15.2## WARNING: Any manual changes made to this file will be lost when pyuic5 is# run again. Do not edit this fi