I want to show the tooltip with the text and the time when user selects the item in list view (hovers the mouse on the item in the list view) of QCombobox
.
I'm using a custom QComboBox
with QItemDelegate
.
Are you looking for this? For example:
ui->comboBox->setItemData(0, "This is a tooltip for item[0]", Qt::ToolTipRole);
Since I did not find an example, I'll post this here.
The way to do this on Python (PyQt5) is:
from PyQt5 import QtGui, QtCore
...
combobox.setItemData(0, "This is a tooltip for item[0]",QtCore.Qt.ToolTipRole);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With