[Development] Opinions on QTBUG-71545

Elvis Stansvik elvstone at gmail.com
Mon Nov 5 22:01:51 CET 2018


Den mån 5 nov. 2018 kl 21:35 skrev Thiago Macieira <thiago.macieira at intel.com>:
>
> On Monday, 5 November 2018 12:07:15 PST Elvis Stansvik wrote:
> > If it is to be the same as all other QObjects, then it should maintain
> > its current behavior I think. The destruction of children happens in
> > the QObject destructor. I don't even think one have to look at the
> > QObject destructor docs to understand that - where else would it be
> > done, considering the parent/child mechanism is a mechanism common to
> > all QObject-derived classes
>
> Ah, but there's an exception: QWidget's destructor destroys its children, so
> that they get to see their parent before the QWidget ceases to be a QWidget.

Ah yes, I was talking about QObjects in general. QWidget is an
exception. Having hardly ever relied on that behavior more than
indirectly, I almost forgot about it.

But seems to me it would be a slippery slope to accept more
exceptions. What's next, will I have to implement the destruction
myself in my own widgets? :)

Elvis

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list