I'm trying to get checkboxes into my treeview and can't quite get it to work. I've looked around and can't find anything to solve my problem. I've attached the code that I have so far, but doesn't work:
cities->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
cities->setText(0, tr("Places"));
QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
cities->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
cities->setText(0, tr("Places"));
(new QTreeWidgetItem(cities))->setText(0, tr("USA Cities"));
To copy to clipboard, switch view to plain text mode
Thank you in advance for your help
Bookmarks