maarvi
28th June 2011, 10:28
hello every one i want to make list in Qt having 3 column i have made code but its not working kindly have a look at it
QStandardItemModel *listmodel = new QStandardItemModel(this);
QStandardItem * root = listmodel->invisibleRootItem();
QStandardItem *item = new QStandardItem("col1" ,"col2" ,"col3");
root->appendRow(item);
i am getting an error at 3rd line kindly tell me how to add columns in list box
QStandardItemModel *listmodel = new QStandardItemModel(this);
QStandardItem * root = listmodel->invisibleRootItem();
QStandardItem *item = new QStandardItem("col1" ,"col2" ,"col3");
root->appendRow(item);
i am getting an error at 3rd line kindly tell me how to add columns in list box