I did this project in ubuntu 12.04 their it's working fine and i brought this code to windows and compiled it's giving assertion AT model->filepath(index) when double clicking on treeview
void DataMgr:n_treeView_doubleClicked(const QModelIndex &index)
{
QFileSystemModel *model = new QFileSystemModel;
QString strFilePath = model->filePath(index);
---------------- GETTING ASSERTION WHILE USING model->filepath(index) WHY? WHEN I AM USING model->filename(index) it's not giving any error
qDebug()<<strFilePath;
QFileInfo fileinfo(strFilePath);
}
Bookmarks