Hello group,

It has been a long time since I've posted btu I have a problem that I need 
some help with in PySide2.

So, I have a QFileSystemModel set up as the model for a TreeView to list 
dirs in a system. What I am setting up for the user is for them to choose 
which dirs are listed, include favourites etc. What I am trying to achieve 
is for the test_duplicates folder to be the ONLY folder that is shown & 
expandable with all relevant filetypes that the user may want shown, audio 
files, image files etc.



When searching for a solution to this problem I cam across this old 
post: https://groups.google.com/g/python_inside_maya/c/a2QM_KvgfeI

I have implemented justins example but have tried to flip it so that ONLY a 
certain dir shows up instead of exluding the dir pattern I get an empty 
result set. When I debugged it, it looked like QFileSystemModel iterates 
the entire dir tree and excludes the root level folders too... is this 
expected behaviour?



Here is what I did, nothing mega really, just inverted the True/False for 
Justins model 
https://gist.github.com/ben-hearn-sb/ab2693db819248efea85ecef355e0887

Cheers!

Ben

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/b79c066f-d181-4e88-a250-d2f2654452f9n%40googlegroups.com.

Reply via email to