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


Python QTableWidgetItem.setCheckState方法代码示例

本文整理汇总了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)
开发者ID:mapclient-plugins,项目名称:asmsegmentationstep,代码行数:10,代码来源:mayaviasmsegmentationviewerwidget.py

示例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))
开发者ID:mapclient-plugins,项目名称:mayaviviewerstep,代码行数:10,代码来源:mayaviviewerwidget.py

示例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)
开发者ID:heartvalve,项目名称:pelvislandmarkshjcpredictionstep,代码行数:12,代码来源:hjcpredictionviewerwidget.py

示例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
开发者ID:kerneltravel,项目名称:Pcs-Netdisk-Shareman,代码行数:21,代码来源:settings_controller.py


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