Results 1 to 3 of 3

Thread: File Browse Window

  1. #1
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default File Browse Window

    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)
    Qt Code:
    1. QDirModel model;
    2. QTreeView tree;
    3. tree.setModel(&model);
    4.  
    5. tree.setRootIndex(model.index(QDir::homePath()));
    6. tree.setColumnHidden( 1, true );
    7. tree.setColumnHidden( 2, true );
    8. tree.setColumnHidden( 3, true );
    9.  
    10. tree.setWindowTitle(QObject::tr("Dir View:")+QDir::homePath());
    11. tree.resize(640, 480);
    12. tree.show();
    To copy to clipboard, switch view to plain text mode 

    But I get the error at QDirModel model;
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: File Browse Window

    Whar error?

  3. #3
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Re: File Browse Window

    while running the code theres no error, but while debugging
    QDirModel model
    The code goes into QGrayRaster.c

Similar Threads

  1. Qt Creator Browse files dialog not showing
    By wiseodd in forum Qt Tools
    Replies: 7
    Last Post: 11th September 2010, 13:24
  2. Browse /dev/ using QFileDialog on Mac OS X
    By blueillusion in forum Qt Programming
    Replies: 0
    Last Post: 22nd July 2010, 21:41
  3. browse button & load image
    By electronicboy in forum General Programming
    Replies: 1
    Last Post: 24th October 2009, 15:06
  4. Browse Button
    By electronicboy in forum General Programming
    Replies: 1
    Last Post: 17th October 2009, 13:50
  5. Browse folder dialog
    By StephenR in forum Qt Programming
    Replies: 4
    Last Post: 8th September 2009, 13:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.