[Interest] Tempalted QObjects

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Mon Feb 22 16:39:29 CET 2016


This is what I do too, but this would (hopefully) enable features such as
sending signals with an argument parametrized on the parent class type.

Some hack that I had to do this once (I since moved to another library for
signals / slots but I'd rather only use Qt's)  :
https://github.com/OSSIA/i-score/blob/ce33563c76bfdfef9e55a34a713262d84825d1a0/base/lib/iscore/tools/NotifyingMap.hpp
https://github.com/OSSIA/i-score/blob/ce33563c76bfdfef9e55a34a713262d84825d1a0/base/lib/iscore/tools/NotifyingMap_impl.hpp

Thanks :)
Jean-Michaël

On Mon, Feb 22, 2016 at 4:32 PM, Igor Mironchik <igor.mironchik at gmail.com>
wrote:

> Hello.
>
> On 22.02.2016 16:43, Jean-Michaël Celerier wrote:
>
> Hello,
> Following Oliver Goffart's blog bost :
>
> https://woboq.com/blog/moc-myths.html
>
> "For example, I implemented support for templated QObjects in moc
> <https://codereview.qt-project.org/49864/>, but this was not merged
> because it did not raise enough interest within the Qt project."
>
> I would personnally be quite interested in this feature. Who doesn't like
> good generic code ? :) And I am pretty sure that this would enable
> wonderful new uses of QObject.
>
>
> I agree, templated QObject is very nice feature. Few times I used
> templates with QObjects, workaround is simple: you declare QObject-based
> class, define signals, slots in it... And then declare templated class
> derived from that that derived from QObject. But native support of
> templated QObject-based classes would be much more better.
>
>
> Maybe if enough persons manifest themselves on the mailing list ?
>
>
> I sign you manifest :)
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160222/13ed307e/attachment.html>


More information about the Interest mailing list