当前位置: 首页>>代码示例>>Python>>正文


Python QTableWidgetItem.text方法代码示例

本文整理汇总了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()
开发者ID:cti-gr,项目名称:avgui,代码行数:45,代码来源:signalManager.py


注:本文中的PySide.QtGui.QTableWidgetItem.text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。