[Development] QAbstractItemModel::createIndex(void const*)?

Konstantin Shegunov kshegunov at gmail.com
Tue Nov 27 18:46:23 CET 2018


On Tue, Nov 27, 2018 at 7:41 PM Matthew Woehlke <mwoehlke.floss at gmail.com>

> But... why *isn't* there such an overload?

Your object is const, so the implicit cast to void * fails.

> Is there any reason not to add one?

I'd say the question is rather, is there really a reason to add one?

Usually the data is contained in a non-const object, presumably in the
model itself, so the pointer isn't ordinarily pointing to an immutable
Do you need to enforce the const?

Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20181127/8564ba11/attachment.html>

More information about the Development mailing list