Re: rotate text help
Sun, 26 Mar 2006 20:33:00 -0500
I'm not sure what you mean by "My QCanvasRectangle contains a QCanvasText",
but it cant be good. QCanvasItems are have no parent child relationship and
you definatly cannot have a QCanvasRectangle with other items as class members.
If you want a square with text on it you are best off either subclassing
QCanvasText and overriding the draw() or drawShape method such that you draw
the background, then
call the superclass's draw(). Or subclass the rectangle and do all the drawing
its not real difficult. You could have added a call to QPainter::drawText to
your posted code and be almost there.
From: jeep@xxxxxxxxx (Jeff Lacki)
Subj: Re: rotate text help
Date: Sun Mar 26, 2006 12:15 pm
Size: 396 bytes
To: justin@xxxxxxx, qt-interest@xxxxxxxxxxxxx
Im sorry Justin, I made a mistake...working on too many things at
once. I was looking at my rectangle class which contains a
Q3CanvasText that I wish to rotate via the code I gave earlier.
RotatedText inherits from Q3CanvasText. I create a RotatedText
object within my subclass which is a Q3CanvasRectangle. This
subclass just contains a bunch of items so I can move them all
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/