本文整理汇总了Python中PySide.QtGui.QTableWidgetItem.text方法的典型用法代码示例。如果您正苦于以下问题:Python QTableWidgetItem.text方法的具体用法?Python QTableWidgetItem.text怎么用?Python QTableWidgetItem.text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QTableWidgetItem
的用法示例。
在下文中一共展示了QTableWidgetItem.text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onScanFinish
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import text [as 别名]
def onScanFinish(self, normalTermination):
global infectionsList
self.theScanWorker.sigWriteScan.disconnect()
# infectionsList = []
print("Entering onScanFinish, from signalManager, normalTermination = " + str(normalTermination))
if hasattr(self, 'theScanWorker'):
self.theScanWorker.exit()
while not self.theScanWorker.wait():
print("Waiting for scan worker to finish")
self._theMainWindow.theScan.theScanProgress.btnExitScan.setText(langmodule.btnExitUpdateProgTitle)
if hasattr(self, 'theScanWorker'):
del self.theScanWorker
print("The Scan Worker is being Deleted")
else:
print("The Scan Worker Was Already Deleted")
try:
lockerFinish = QMutexLocker(mutexTermination)
if normalTermination=="True":
if infectionsList:
header1 = QTableWidgetItem("Threats")
header2 = QTableWidgetItem(("Files"))
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setColumnCount(2)
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setRowCount(len(infectionsList))
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setHorizontalHeaderItem(0, header1)
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setHorizontalHeaderItem(1, header2)
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.horizontalHeader().setStretchLastSection(True)
for i in range(1, len(infectionsList) + 1):
newItem0 = QTableWidgetItem(infectionsList[i-1])
newItem1 = QTableWidgetItem(infectedFiles[i-1])
print("line " + str(i) + ": " + newItem0.text())
print("line " + str(i) + ": " + newItem1.text())
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setItem(i-1, 0, newItem0)
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.setItem(i-1, 1, newItem1)
self._theMainWindow.theScan.theScanProgress.theShowScanResults.tableWidget.resizeColumnsToContents()
self._theMainWindow.theScan.theScanProgress.theShowScanResults.show()
self.theSQLITEWorker.start()
except Exception as errmut2:
print(str(errmut2))
exit(-1)
gc.collect()