[Qt-interest] Qt memory management.
Arnold Krille
arnold at arnoldarts.de
Wed Aug 18 12:09:33 CEST 2010
Hi,
On Wednesday 18 August 2010 11:15:19 Ramesh wrote:
> Qt widgets uses shared memory so we can't copy a widget to another widget
> right?
No, QWidgets (and all QObjects) are organized in a tree. And copying within a
tree or from one tree to another needs copy-constructors and -operators with
two arguments (original and new parent).
> But in this case
> p2 = p1;
> both are Qpixmap object, and Qpixmap is not inherited from Qobject so
> assigning a pixamp to another leads to copy operation right?.
Yes.
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100818/664aab12/attachment.bin
More information about the Qt-interest-old
mailing list