QFileDialog disable Dir Path
Guys,
How to disable drop down option in the comboBox in the QFileDialog so user can view only current directory path. I have tried using static such as getSaveFileName etc. But I am not able to either dsiable directory path combobox or drop down paths. I want to restrict user to view only given path.
Code:
QString path
= qApp
->applicationDirPath
();
fd->exec();
Any ideas or hints will be helpful.
Re: QFileDialog disable Dir Path
You'll need to do some hacking. You have to check Qt's sources to find out what the object name of the combobox is. Then use qFindChildren() (or whatever it is called in Qt3) on the dialog to query for the pointer to the object with a given name. Then you'll be able to hide or disable the widget.
Re: QFileDialog disable Dir Path
Thanks Wyosta ..That's exactly I did and solved my problem. I used QObject::queryList to find the objectName and type.