How to apply filter when using QDirIterator with PySide?
General and Desktop
1
Posts
1
Posters
887
Views
1
Watching
-
wrote on 26 May 2014, 12:53 last edited by
Hello,
I'm trying to use the QDirIterator class combined with a filter in PySide. The recursive plotting of all the directories is working quite well. My problem is just that it doesn't apply a selected filter properly (ex. PySide.QtCore.QDir.NoDot).
When I use a code similar to:
@
from PySide.QtCore import (QDir, QDirIterator)path = QDir.currentPath()
it = QDirIterator(path, QDir.Dirs | QDir.NoDotAndDotDot, QDirIterator.Subdirectories)
while it.hasNext():
print it.next()
@it still prints the ".", ".." and all files. What am I doing wrong?
Thank you in advance for your help!
1/1