Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to apply filter when using QDirIterator with PySide?
Forum Updated to NodeBB v4.3 + New Features

How to apply filter when using QDirIterator with PySide?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 887 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pytobias
    wrote on 26 May 2014, 12:53 last edited by
    #1

    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 Reply Last reply
    0

    1/1

    26 May 2014, 12:53

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved