Hi,
I am using QTreeWidget in my application. I come across a situation where i need a function which takes QList<QTreeWidgetItem*> and returns QStringlist. I am somewhat using the code below to cast the QList<QTreeWidgetItem*> to QStringList.
QStringList convertToStringList(QList<QTreeWidgetItem*> &items)
{
QStringList lines;
lines.clear();
for(int i=0;i<item.size();++i)
{
lines += static_cast<QStringList *> (item.at(i));
}
return lines;
}
I am not able to cast the QList<QTreeWidgetItem* > item to QStringList. Please help me with this.
Thanks. Waiting for reply.
Bookmarks