qt - Sorting QObject children -
i noticed qobject::children() method return const reference qobjectlist, contains children of qobject. safe cast away constness , sort list qsort?
thanks anton
no, should not this. definition of qobject::children():
inline const qobjectlist &children() const { return d_ptr->children; }
this means directly reference of internal objectlist. , documentation says:
note list order changes when qwidget children raised or lowered. widget raised becomes last object in list, , widget lowered becomes first object in list.
it looks bad idea mess list.
Comments
Post a Comment