QDirIterator not working with flags ;/
Unsolved
Qt for Python
-
Hey
I can't get it to work, what's wrong >it = QDirIterator(dirPath, QDir.NoDotAndDotDot, QDirIterator.Subdirectories)
Dat gives me empty stuff
Regards
DariuszI also cant get this to print anything>
it = QDirIterator(dirPath, ["*.exr"], filters=QDir.NoDotAndDotDot, flags=QDirIterator.NoIteratorFlags)
-
@Dariusz Filters are flags so if you want to get directories and not dotanddots then use:
it = QDirIterator( dirPath, QDir.Dirs | QDir.NoDotAndDotDot, flags=QDirIterator.Subdirectories )
If you want files:
it = QDirIterator( dirPath, QDir.Files | QDir.NoDotAndDotDot, flags=QDirIterator.Subdirectories )
Same:
it = QDirIterator( dirPath, ["*.exr"], filters=QDir.Files | QDir.NoDotAndDotDot, flags=QDirIterator.NoIteratorFlags )