QTreeWidgetItem *item = treeWidget->currentItem(); for (int i = 0; i < item->childCount(); ++i) { QTreeWidgetItem *child = item->child(i); child->setCheckState(column, Qt::Checked); }
QTreeWidgetItemIterator it(treeWidget); while (*it) { if ((*it)->text(0) == itemText) (*it)->setSelected(true); ++it; }
QTreeWidgetItemIterator it(signalTree); while (*it) { if ((*it)->child(0) == 0) { (*it)->setFlags(item->flags()|Qt::ItemIsUserCheckable); (*it)->setCheckState(0,Qt::Checked); } ++it; }