On Fri, 7 Nov 2025 at 00:34, Ville Voutilainen <[email protected]> wrote: > > On Thu, 6 Nov 2025 at 16:39, Volker Hilsheimer <[email protected]> > wrote: > > As the mailing list doesn’t make for a great code review experience: > > https://codereview.qt-project.org/c/qt/qtbase/+/689322 > > > > Good catch with QWindow (and possibly other types for which we explictly > > overload setParent to require something else than QObject *); QGraphicsItem > > is not a QObject. > > I know that QGraphicsItem is not a QObjct, but previous descriptions > of this function also didn't SFINAE away QObject-*non*-derivates. :D
..and to make it clearer what I mean, you can try to do someQObject->makeChild<SomeGraphicsItem>(); and that won't compile, but you need to decide what quality of diagnostic you want to give it. And maybe QGraphicsItem should have its own makeChild(), too. -- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
