[Qt-interest] About inheriting from QGraphicsObject
Malyushytsky, Alex
alex at wai.com
Sat Sep 3 03:56:15 CEST 2011
Use multiple inheritance ( C++ is a great language ) –
Derive your class from QObject (first ) and QGraphicsLineItem
( Don’t forget Q_OBJECT macro, etc )
Regards,
Alex
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Marc Ferland
Sent: Friday, September 02, 2011 7:34 AM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] About inheriting from QGraphicsObject
Hi,
I'm currently writing a set of classes that need to inherit from QGraphicsObject to use signals, slots and properties and, for some of these classes I would also like to reuse the implementation of predefined graphics items like QGraphicsLineItem.
What would be the best way to do this? At first I thought I would just copy-paste the "drawing" code from the basic graphics items but this doesn't seem right...!
I guess what I'm looking for is a QGraphicsObjectLineItem class.
Regards,
Marc
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110902/9a8dea35/attachment.html
More information about the Qt-interest-old
mailing list