用户:
永退者查看:0 回复:0 评论:0 创建时间:2021-03-05T22:44:36
下面代码的报错的原因是什么?求大佬
import sys
import os
from PySide2.QtWidgets import*
from PySide2.QtCore import QUrl
from PySide2.QtWebEngineWidgets import QWebEngineView
from ui_Cibrtqit import Ui_Cibrtqit
import time
class Cibrtqit(QMainWindow, Ui_Cibrtqit):
def __init__(self):
super().__init__()
self.setupUi(self)
self.init_set()
self.show()
self.label_3.clicked.connect(self.time)#报错代码
def init_set(self):
self.browser = QWebEngineView()
def time(self):
er = time.ctime()
self.label_3.setText(er)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = Cibrtqit()
sys.exit(app.exec_())