Dear All
We create a QTreeWidget with a SQL query. We bring all the values like
q.exec("...");
while(q.next())
{
cities->setText(0, tr(q.value(0).toString()));
}
QSqlQuery q;
q.exec("...");
while(q.next())
{
QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
cities->setText(0, tr(q.value(0).toString()));
}
To copy to clipboard, switch view to plain text mode
There is no problem with this one. But in the query in some row I have child on cities items.
q.value(0).toString()
q.value(0).toString()
To copy to clipboard, switch view to plain text mode
is not same in every row, so is it possible to find which item on the tree that I could add the child?
Bookmarks