I have a GUI that uses a QTreeWidget to load a list of key - value pairs from a JSON file.
My question is if it's possible to set a tooltip for every item (just the keys) of the QTreeWidget?
P.S. I would like to keep the tree widget and do not move to QTreeView.
You could easily answer a questions like this by looking at the documentation for QTreeWidgetItem:
void QTreeWidgetItem::setToolTip(int column, const QString &toolTip)
Sets the tooltip for the given column to toolTip.
Which in PyQt5 will simply be:
item = QTreeWidgetItem(key)
item.setToolTip(0, 'some text')