[Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

Rainer Wiesenfarth Rainer_Wiesenfarth at Trimble.com
Mon Jul 20 17:53:17 CEST 2015


From: Guido Seifert
> Hi, just seen this in project's code. Worse, I have been told to do it
> exactly this way in another code part.

What about:
- the QObject's parent? Is it set with setParent(other->parent()) or set to nullptr?
- the QObject's thread? Is it guaranteed that it is the same thread that creates the copy?
- the QObject's children? Who is going to own them and when are they deleted?
- the QObject's connections? Will all copies emit the same signals, will all copies have their slots called?

...or just look at the Qt documentation on QObject, at http://doc.qt.io/qt-5/qobject.html#no-copy-constructor.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6250 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150720/06d8bc3d/attachment.bin>


More information about the Interest mailing list