Qt-interest Archive, February 2007
Get the size of QPainterPath.
Message 1 in thread
Hey there,
Since I can't anticipate the size of my painterpath (it's a string),
I'm trying to get the size X and the size Y of my path :
QPainterPath painterPath;
painterPath.addText(QPoint(option.rect.x() + 90, option.rect.y() + 30),
fontUserName, myString);
Any way to do that ?
Thanks.
Ben.
--
[ signature omitted ]
Message 2 in thread
"bunjeee" <bunjeee@xxxxxxx> wrote in message
news:eretkj$q8q$1@xxxxxxxxxxxxxxxxxxxxx
> Hey there,
>
> Since I can't anticipate the size of my painterpath (it's a string),
>
> I'm trying to get the size X and the size Y of my path :
>
>
>
> QPainterPath painterPath;
>
> painterPath.addText(QPoint(option.rect.x() + 90, option.rect.y() + 30),
> fontUserName, myString);
>
>
>
> Any way to do that ?
QPainterPath::boundingRect or controlPointRect() should be rather useful
for this.
Volker
--
[ signature omitted ]