PDA

View Full Version : QFileDialog disable buttons



Qt Coder
10th August 2009, 13:05
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.

dialog.setDirectory(QDir(Dir)); .

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?

yogeshgokul
10th August 2009, 13:33
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.

Qt Coder
10th August 2009, 14:46
Can you show me some code how to subclass QFiledialog and then disable these buttons??

Qt Coder
11th August 2009, 12:02
Does anyone know how to acheive this????