maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Hidden Files and QtGui.QFileDialog (https://talk.maemo.org/showthread.php?t=56485)

Nathraiben 2010-06-17 18:59

Hidden Files and QtGui.QFileDialog
 
Hello there!

I'm working on an app right now where I would like the user to be able to select files from a hidden folder, yet when I try to open the file dialog, I'm getting redirected back to /home/user. Took me a while to realise that it was actually the hidden folder that spawned this behaviour.

Searching the web I found hints on the original Qt library featuring a flag to be set on QFileDialog in order to activate hidden files - but I couldn't find anything like that for PyQt.

Does anybody know of a way to convince Python to show hidden files in file dialogs, or will I have to do it the hard way (writing my own popup with a list of all the files in that directory)?

Thanks in advance! :)

Rob1n 2010-06-17 20:35

Re: Hidden Files and QtGui.QFileDialog
 
Looking at the Qt documentation, I think you'll need to use QFileDialog.setFilter(QDir.Hidden)

Nathraiben 2010-06-17 21:56

Re: Hidden Files and QtGui.QFileDialog
 
Thanks, that was the hidden piece I was missing!

Though... *sigh*
According to every little bit of information I was able to collect on the web, it seems like I can EITHER get the native dialog OR set the Hidden filter.

Which is a bit of a problem since the none-native dialog on the N900 is ugly, confusing and far too crammed. Guess I'll still have to do it the hard way. :(


All times are GMT. The time now is 14:22.

vBulletin® Version 3.8.8