[Qt-interest] Rotate problem
Sujan Dasmahapatra
sdh at lmglasfiber.com
Mon May 4 09:15:11 CEST 2009
When user presses apply button on the UI agai it comes into this
function and it's not rotating the text it's convertin the text to
double before rotating.check the code properly......
Kind regards,
Sujan Dasmahapatra
From: chandrasekar wagmare [mailto:sekarwagmare at gmail.com]
Sent: Monday, May 04, 2009 12:13 PM
To: Sujan Dasmahapatra
Subject: Re: [Qt-interest] Rotate problem
how u are again try to rotate the text for second time .. when user
enter new value .? or any timers aa . ....
why dont u try the transform part in
void QGraphicsItemItem::paint(QPainter *painter, const
QStyleOptionGraphicsItem *, QWidget *)
and call update(boundingRect()) when ever u need the rotation and
transformation ...
On Mon, May 4, 2009 at 11:41 AM, Sujan Dasmahapatra
<sdh at lmglasfiber.com> wrote:
Dear Friend I think it's a Qt bug..I am trying to rotate a graphicsItem
about (0,0) but it's rotating only for once.....2nd time onwards it's
not rotating...what could be the reason plss help me..
void Transform::Apply()
{
angleString = angleLE->text();
xcString = xcLE->text();
ycString = ycLE->text();
angle = angleString.toDouble();
xc = xcString.toDouble();
yc = ycString.toDouble();
geometry->setTransform(QTransform().translate(xc,
yc).rotate(angle).translate(-xc, -yc));
console->append("\n");
console->append("geometry is rotated by
" + angleString + " about point ( " + xcString + ", " + ycString + "
)");
console->append("\n");
}
but it's rotating for the first time if I click 2nd time it's not
rotating.
Kind regards,
LM Glasfiber R&D (India) Pvt. Ltd.
Sujan Dasmahapatra
Project Engineer - CFD
Telephone: +91 80 66470248
Mobile:
E-mail: sdh at lmglasfiber.com
--------------------------------------------------------------
This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose or
store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
--
WAGMARE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090504/bc6e1c99/attachment.html
More information about the Qt-interest-old
mailing list