[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] causes self to be owned by Qt instead of PyQt ???
From:       Baz Walter <bazwal () ftml ! net>
Date:       2015-04-02 22:54:25
Message-ID: 551DC8A1.5010200 () ftml ! net
[Download RAW message or body]

On 02/04/15 23:01, Andreas Pakulat wrote:
> Hi Phil,
>
> On Thu, Apr 2, 2015 at 11:11 PM, Phil Thompson <phil@riverbankcomputing.com>
> wrote:
>>
>> So the attached C++ code should compile?
>
> Not without a fix for qfilesystemmodel.h. qabstractitemmodel.h as well as
> qstandarditemmodel.h (and probably other qaim subclasses in qt) explicitly
> 'reuse' QObject::parent using something like:
>
> #ifdef Q_NO_USING_KEYWORD
>      inline QObject *parent() const { return QObject::parent(); }
> #else
>      using QObject::parent;
> #endif
>
> For qfilesystemmodel.h this is missing and hence one cannot call
> QObject::parent() with a pointer or instance of it.

Huh. So is it a Qt bug, then? Seems a little strange that it has gone 
unnoticed for so long (since at least 4.7). But maybe there's a specific 
reason why QFileSystemModel is be treated differently to all the other 
model classes.

Looks like Q_NO_USING_KEYWORD has been completely removed in Qt-5.5, but 
obviously that didn't touch qfilesystemmodel.h, so parent() is still 
missing there.

-- 
Regards
Baz Walter
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic