本文整理汇总了Python中PyQt5.Qt.QTableWidgetItem.setToolTip方法的典型用法代码示例。如果您正苦于以下问题:Python QTableWidgetItem.setToolTip方法的具体用法?Python QTableWidgetItem.setToolTip怎么用?Python QTableWidgetItem.setToolTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.Qt.QTableWidgetItem
的用法示例。
在下文中一共展示了QTableWidgetItem.setToolTip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: populate_table_row
# 需要导入模块: from PyQt5.Qt import QTableWidgetItem [as 别名]
# 或者: from PyQt5.Qt.QTableWidgetItem import setToolTip [as 别名]
def populate_table_row(self, row, line):
if True:
checkbox_cell = QTableWidgetItem()
checkbox_cell.setFlags(Qt.ItemIsUserCheckable | Qt.ItemIsEnabled)
checkbox_cell.setCheckState(Qt.Unchecked)
checkbox_cell.setToolTip(_('Checked sections will be included in <i>all</i> split books.<br>Default title will still be taken from the first <i>selected</i> section, and section order will remain as shown.')+
'<br>'+_('Use Context Menu (right-click) on selected sections to check or uncheck all selected sections.'))
self.setItem(row, 0, checkbox_cell)
href = line['href']
if line['anchor']:
href = "%s#%s"%(href,line['anchor'])
href_cell = ReadOnlyTableWidgetItem(href)
href_cell.setToolTip(line['sample']+SAMPLE_NOTE)
self.setItem(row, 1, href_cell)
if 'guide' in line:
guide = "(%s):%s"%line['guide']
else:
guide = ""
guide_cell = ReadOnlyTableWidgetItem(guide)
guide_cell.setToolTip(_("Indicates 'special' pages: copyright, titlepage, etc."))
self.setItem(row, 2, guide_cell)
toc_str = "|".join(line['toc'])
toc_cell = QTableWidgetItem(toc_str)
toc_cell.setData(Qt.UserRole, toc_str)
toc_cell.setToolTip(_('''Click and copy hotkey to copy text.
Double-click to edit ToC entry.
Pipes(|) divide different ToC entries to the same place.'''))
self.setItem(row, 3, toc_cell)