Show tooltip when the user selects item in QComboBox

Wagmare picture Wagmare · Apr 30, 2014 · Viewed 7.9k times · Source

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.

Answer

Tay2510 picture Tay2510 · Apr 30, 2014

Are you looking for this? For example:

 ui->comboBox->setItemData(0, "This is a tooltip for item[0]", Qt::ToolTipRole);

enter image description here