kamlmish
16th December 2010, 05:17
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)
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();
But I get the error at QDirModel model;
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)
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();
But I get the error at QDirModel model;