Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QSqlquery query;
- query.prepare("select DeviceName from Devices" );
- if(query.exec())
- {
- ui->treeWidget_Device->setColumnCount(1);
- QList<QTreeWidgetItem *> items;
- for (int i = 0; i < 10; ++i) // here I have confusion about list numbers. my
- //list is verx big and will be added more
- item.append(new QTreeWidgetItem((QTreeWidget*)0, QString("item:%1").arg(i))); //this is an example with simple string but
- // I want to show my query in here
- ui->treeWidget_Device->insertTopLevelItems(0, items);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement