PDA

View Full Version : Refreshing a select file open dialouge



Dwitee
2nd August 2010, 16:00
Hi,
My Requirement: In my application when I open my "select file dialouge window" then I go to my computer to map a new network drive , then I come to my already opened "select file dialouge window" . I am unable to to see the new network drived mapped.


for this I found that in QT3 QFileDialog: has a function rereadDir() which is provided in case the directory contents change and you want to refresh the directory list box.
But in QT4

My application is using QT4.4 please suggest the best way to refresh the "select file window".

thanks in advance,
Dwitee

Lykurg
2nd August 2010, 16:12
Hi,

I never had such a requirement but I'd guess you can reach the underlaying file model by QFileDialog::proxyModel() and update it. Haven't tried it.

tbscope
2nd August 2010, 16:12
QFileDialog makes use of QFileSystemModel which maks use of QFileSystemWatcher.
This means that the file dialog is always updated, you don't need to call an update function yourself.