KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to extract a QIcon I've stored in one of a QTreeWidget's columns, as Qt::DecorationRole. QTreeWidgetItem *item = ui->treeWidget->topLevelItem(index); const QIcon &icon = item->data(0, Qt::DecorationRole)._howToConvert_(); However, I can only get the data as QVariant, and I could not find a function to convert from a QVariant to QIcon. Is it possible to do it?
Tags (comma-separated)
Save Edits
Cancel