Hi
I am facing a strange issue in the QDIRMODEL
I have written the below code on the SLOT function for the button SIGNAL( clicked), but when I run the code , the tree doesnt show and when I debug the code
QDirModel model
goes into qgrayraster
tree.setModel(model);
tree.
setRootIndex(model
->index
(QDir::homePath()));
tree.setColumnHidden( 1, true );
tree.setColumnHidden( 2, true );
tree.setColumnHidden( 3, true );
tree.
setWindowTitle(QObject::tr("Dir View:")+QDir::homePath());
tree.resize(640, 480);
tree.show();
QDirModel model;
QTreeView tree;
tree.setModel(model);
tree.setRootIndex(model->index(QDir::homePath()));
tree.setColumnHidden( 1, true );
tree.setColumnHidden( 2, true );
tree.setColumnHidden( 3, true );
tree.setWindowTitle(QObject::tr("Dir View:")+QDir::homePath());
tree.resize(640, 480);
tree.show();
To copy to clipboard, switch view to plain text mode
May I know where am I going wrong
Bookmarks