How to assign different Url to my TreeView Items
-
12-12-2019 - |
Question
I am new to Qt. I had created a Qtree View using QStandard item model. Now I want to set Url to my items. How can I assign url for tree view items.
Solution
you can use setData API of QStandardItem, with user defined role for storing URL.
void QStandardItem::setData ( const QVariant & value, int role = Qt::UserRole + 1 )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow