Active Topics

 


Reply
Thread Tools
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#1
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!
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#2
Looking at the Qt documentation, I think you'll need to use QFileDialog.setFilter(QDir.Hidden)
 

The Following User Says Thank You to Rob1n For This Useful Post:
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#3
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.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:55.