QtGui.QFileDialog.getOpenFileName filtering

Anyone have any luck doing some fancy filtering with this?

fancy_filter = #exclude files with a keyword in the name. i.e. ‘hero’, ‘@’, etc.

QtGui.QFileDialog.getOpenFileName(filter = fancy_filter)

It seems the filter does only wildcard matching, not full regex. Is that the case? Should I override a QSortFilterProxyModel, and use that as the file dialog’s proxy model?

Seems regex is possible :
http://www.vision.ee.ethz.ch/computing/sepp-irix/qt-2.1.1-to/qfiledialog.html#f25fe3

Hmmm. Can’t get anything to work!

Also having trouble with the directory flag, not consistently opening up to the directory I tell it. (this is all in Maya)

I’m a fool. It’s not gonna open up to a directory that doesn’t exist. So it opens up to some default existing directory that Windows gives it. I think.

Giving up on regex in the file filter though…