On Freitag, 11. September 2020 12:44:09 CEST Volker Hilsheimer wrote:
> > On 11 Sep 2020, at 12:37, Allan Sandfeld Jensen <k...@carewolf.com> wrote:
> > 
> > Should we add a generic virtual hook in qobject, so any qobject can expand
> > 
 their with effectively virtual functions in Qt6?
> > 
> > I imagine something like QVariant QObject::virtual_hook(int id, QVariant 
> > args);
> > 
> > Or do we already have other useful work-arounds for this common problem?
> > 
> > Best regards
> > ‘Allan
> 
> 
> We have that already. It’s called qt_metacall :)
> 
Right :) but that typically gets generated by moc, but I see what you mean. 
You can manually implement it, or get a similar effect through careful use of 
INVOKABLE and an indirection.

And the two places I was thinking about cleaning up also turned out to be non-
QObject.

Best regards
Allan


_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to