Hai,
I need to display some icons and information when click on current QtreeWidgetItem



ex: code
Qt Code:
  1. for(int i=0; i<10; i++)
  2. {
  3. QStringList strings;
  4. strings << QString("Wit Name");
  5. QTreeWidgetItem *parent = new QTreeWidgetItem(strings);
  6. ui->secTreeWidget->addTopLevelItem(parent);
  7. // Add the child TreeWidgetItem one step down in the tree
  8. parent->addChild(child);
  9. // Set the widget for the child item to be a QLineEdit for column zero.
  10. ui->secTreeWidget->setItemWidget(child, 0, new QLabel(ui->secTreeWidget));
  11. }
To copy to clipboard, switch view to plain text mode