Results 1 to 4 of 4

Thread: QFileDialog disable buttons

  1. #1
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QFileDialog disable buttons

    Hello all,


    I m using Qt 4.4.3


    I m using QFiledialog in my application to allow user to select images .

    I hav done with above functionality ,now I want to add following things to QFileDialog


    User should only be able to select images from "Dir" set at start.
    Qt Code:
    1. dialog.setDirectory(QDir(Dir)); .
    To copy to clipboard, switch view to plain text mode 

    so Move up/Down /back/Create new folder/Show Path Heirarchy ,buttons of FileDialog should be disabled so that user wont be able to navigate to other folders


    how to acheive this?

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QFileDialog disable buttons

    Quote Originally Posted by Qt Coder View Post
    so Move up/Down /back/Create new folder/Show Path Heirarchy ,buttons of FileDialog should be disabled so that user wont be able to navigate to other folders
    There is no such option available. You can subclass QFileDialog and then disable what you want.

  3. #3
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QFileDialog disable buttons

    Can you show me some code how to subclass QFiledialog and then disable these buttons??

  4. #4
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QFileDialog disable buttons

    Does anyone know how to acheive this????

Similar Threads

  1. How to disable NextButton in QWizard ?
    By litroncn in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2008, 07:05
  2. QFileDialog disable Dir Path
    By user_mail07 in forum Qt Programming
    Replies: 2
    Last Post: 15th April 2008, 19:57
  3. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  4. disable floppy reading in a QFileDialog?
    By SkripT in forum Qt Programming
    Replies: 6
    Last Post: 17th December 2007, 06:43
  5. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41

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.