HI
I need to create a file browse window , the window should be opening up on the click of the button.
The image of the file browser app is attached.
I have written the code on the SLOT function for the button SIGNAL( clicked)
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
But I get the error at QDirModel model;
Bookmarks