PDA

View Full Version : File Browse Window



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;

tbscope
16th December 2010, 05:38
Whar error?

kamlmish
16th December 2010, 05:48
while running the code theres no error, but while debugging
QDirModel model
The code goes into QGrayRaster.c