[Qt-interest] QList<T> conversion
John Weeks
john at wavemetrics.com
Fri Jan 28 23:50:39 CET 2011
On Jan 28, 2011, at 1:58 PM, Gustavo de Sá Carvalho Honorato wrote:
> is it possible to convert QList<A*> to QList<QObject*>, where A inherits from QObject? I would like to do this without create a new QList<QObject*> container and typecasting each element before add into this new one. Is there any better solution than that?
If A inherits from QObject, then A* already IS a QObject *. So the question would be, why do you need to do that?
Regards,
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
email support at WaveMetrics.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110128/5126f078/attachment.html
More information about the Qt-interest-old
mailing list