本文整理汇总了Python中PyQt5.QtCore.QModelIndex.internalId方法的典型用法代码示例。如果您正苦于以下问题:Python QModelIndex.internalId方法的具体用法?Python QModelIndex.internalId怎么用?Python QModelIndex.internalId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.QModelIndex
的用法示例。
在下文中一共展示了QModelIndex.internalId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: selectSample
# 需要导入模块: from PyQt5.QtCore import QModelIndex [as 别名]
# 或者: from PyQt5.QtCore.QModelIndex import internalId [as 别名]
def selectSample(self,index: QModelIndex):
print("select row",index.row(),"column",index.column(),"id",index.internalId())
self.currentWell=self.sampleTable.item(index.row(),1).text()
print("sample item=",self.sampleTable.item(index.row(),0).text())
self.currentSample=int(self.sampleTable.item(index.row(),0).text())
#self.plateTable.selectRow(index.row())
self.refreshAll()
示例2: selectPlate
# 需要导入模块: from PyQt5.QtCore import QModelIndex [as 别名]
# 或者: from PyQt5.QtCore.QModelIndex import internalId [as 别名]
def selectPlate(self,index: QModelIndex):
print("select row",index.row(),"column",index.column(),"id",index.internalId())
rec=self.plateTable.model().record(index.row())
for i in range(rec.count()):
print(rec.fieldName(i),"=",rec.field(i).value())
self.currentPlate=rec.field(0).value()
#self.plateTable.selectRow(index.row())
self.currentSample=None
self.currentWell=None
self.refreshAll()
示例3: selectRun
# 需要导入模块: from PyQt5.QtCore import QModelIndex [as 别名]
# 或者: from PyQt5.QtCore.QModelIndex import internalId [as 别名]
def selectRun(self,index: QModelIndex):
print("select row",index.row(),"column",index.column(),"id",index.internalId())
pkIndex=index.sibling(index.row(),0)
self.currentRun=self.runsTable.model().data(pkIndex).value()
pgmIndex=index.sibling(index.row(),3)
self.currentProgram=self.runsTable.model().data(pgmIndex).value()
self.currentPlate=None
self.currentSample=None
self.currentWell=None
#self.runsTable.selectRow(index.row())
self.refreshAll()