本文整理汇总了Python中PySide.QtGui.QTableWidgetItem.setCheckState方法的典型用法代码示例。如果您正苦于以下问题:Python QTableWidgetItem.setCheckState方法的具体用法?Python QTableWidgetItem.setCheckState怎么用?Python QTableWidgetItem.setCheckState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QTableWidgetItem
的用法示例。
在下文中一共展示了QTableWidgetItem.setCheckState方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _addObjectToTable
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import setCheckState [as 别名]
def _addObjectToTable(self, row, name, checked=True):
tableItem = QTableWidgetItem(name)
if checked:
tableItem.setCheckState(Qt.Checked)
else:
tableItem.setCheckState(Qt.Unchecked)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['visible'], tableItem)
示例2: _addObjectToTable
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import setCheckState [as 别名]
def _addObjectToTable(self, row, name, obj):
typeName = obj.typeName
print(typeName)
print(name)
tableItem = QTableWidgetItem(name)
tableItem.setCheckState(Qt.Checked)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['visible'], tableItem)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['type'], QTableWidgetItem(typeName))
示例3: _addObjectToTable
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import setCheckState [as 别名]
def _addObjectToTable(self, row, name, obj, checked=True):
typeName = obj.typeName
print 'adding to table: %s (%s)'%(name, typeName)
tableItem = QTableWidgetItem(name)
if checked:
tableItem.setCheckState(Qt.Checked)
else:
tableItem.setCheckState(Qt.Unchecked)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['landmarks'], tableItem)
示例4: _addObjectToTable
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import setCheckState [as 别名]
def _addObjectToTable(self, row, name, obj, checked=True):
typeName = obj.typeName
# print(typeName)
# print(name)
tableItem = QTableWidgetItem(name)
if checked:
tableItem.setCheckState(Qt.Checked)
else:
tableItem.setCheckState(Qt.Unchecked)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['visible'], tableItem)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['type'], QTableWidgetItem(typeName))
开发者ID:mapclient-plugins,项目名称:pointwiserigidregistrationstep,代码行数:14,代码来源:mayaviregistrationviewerwidget.py
示例5: populateUiSearchResult
# 需要导入模块: from PySide.QtGui import QTableWidgetItem [as 别名]
# 或者: from PySide.QtGui.QTableWidgetItem import setCheckState [as 别名]
def populateUiSearchResult(self, results):
self.tblSearchResult.clearContents()
self.tblSearchResult.setRowCount(len(results))
for row in range(len(results)):
newItem = QTableWidgetItem()
newItem.setCheckState(Qt.Unchecked)
self.tblSearchResult.setItem(row, 0, newItem)
newTitle = QTableWidgetItem(results[row].getTitle().split("_免费高速下载")[0])
self.tblSearchResult.setItem(row, 1, newTitle)
print QTableWidgetItem(results[row].getContent())
filesize = results[row].getContent().split(" 分享者")[0].split(' 文件大小:')[1].strip()
newDesc = QTableWidgetItem(filesize)
self.tblSearchResult.setItem(row, 2, newDesc)
newUrl = QTableWidgetItem(results[row].getURL())
self.tblSearchResult.setItem(row, 3, newUrl)
pass