[Interest] Tempalted QObjects
Thiago Macieira
thiago.macieira at intel.com
Mon Feb 22 17:07:51 CET 2016
On segunda-feira, 22 de fevereiro de 2016 14:43:57 PST 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.
>
> Maybe if enough persons manifest themselves on the mailing list ?
Not even that.
The required condition is that someone figure out how to provide a meta object
to template classes. The current solution would require installing the file
generated by moc, #include'ing it from your class's header file, and modifying
the internal format heavily (i.e., a Qt 6.0 task).
This is unlikely to change in the current C++ language. If you want templated
QObjects, please join SG7 discussion group in isocpp.org and help define
reflection for C++. Then hopefully Qt will be able to use this feature in the
early 2020s.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list