[PyQt] overriding QAbstractFileEngine::beginEntryList

Jos van den Oever jos at vandenoever.info
Tue May 24 08:33:31 BST 2011


Hi all,

QAbstractFileEngine is a great way to expose data as a file system. I'd like to 
use it in PyQt4. I've implemented a working test program in C++ and attempted 
to implement the same version in PyQt4. Yet, the function 
QAbstractFileEngine::beginEntryList is not being called.

The signature of the function is
  Iterator* beginEntryList (QDir::Filters filters, const QStringList & 
filterNames)
which I've ported to Python as:
  def beginEntryList(self, filters, filterNames):

The latter function is never called. Overriding other virtual functions works 
fine. The C++ and Python versions are attached. The output should be:
======
beginEntryList 
"." 
".." 
"A" 
"B" 
"C" 
"entryList: 5" 
======

Is there something obvious I'm doing wrong?

Cheers,
Jos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 2327 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110524/88df9211/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 1677 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110524/88df9211/attachment-0001.py>


More information about the PyQt mailing list