QListWidget* listWidget = new QListWidget; QListWidgetItem* item = new QListWidgetItem("Item 1"); item->setWhatsThis("This is Item 1"); listWidget->addItem(item);
QString whatsThis = item->whatsThis();In this example, the whatsThis() function is called on a QListWidgetItem to get the WhatsThis help text for the item. The text is returned as a QString. The QListWidgetItem class is part of the Qt Widgets module.