[PyQt] overriding QAbstractFileEngine::beginEntryList

Phil Thompson phil at riverbankcomputing.com
Tue May 24 10:31:06 BST 2011


On Tue, 24 May 2011 09:33:31 +0200, Jos van den Oever
<jos at vandenoever.info> wrote:
> 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

For some reason beginEntryList() isn't wrapped. Fixed in tonight's
snapshot.

Your script has a number of errors, but they are obvious when the bits of
code actually get to run.

Thanks,
Phil


More information about the PyQt mailing list