PyQt5清除数据(部分控件)

# 清除文本框
self.textEdit_detail.clear()
# 清楚表格所有行
self.tableWidget.setRowCount(0)
self.tableWidget.clearContents()
# 清除进度条
self.progressBar.reset()
app.processEvents()
 
不考虑业务场景,一味的争执技术的高下,都是耍流氓。
原文地址:https://www.cnblogs.com/leoych/p/14721621.html