[Qt-interest] Drawing rectangular

Yuvaraj R yuvaraj at ongobiz.com
Mon Sep 21 17:42:19 CEST 2009


Thanks for your reply..

how do i implement this one for particular QString of text browser..

That's my problem


Please help me


Thanks

Yuvaraj R


On Mon, Sep 21, 2009 at 8:57 PM, Srdjan Todorovic <
todorovic.s at googlemail.com> wrote:

> On 21/09/2009, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
> > Thanks for your reply
> >
> > I want to draw the rounded rectangular around the the particular text of
> > text browser.
>
> You could use:
> void QPainter::drawRoundedRect ( const QRectF & rect, qreal xRadius,
> qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize )
>
> and pass the string's bounding rect as the first parameter. You would
> have to manually calculate the bounding rectangle I think.
>
> http://doc.trolltech.com/4.5/qpainter.html#boundingRect
> Might help with finding out what size the rectangle has to be.
>
> Srdjan
>
> > On Mon, Sep 21, 2009 at 8:36 PM, Srdjan Todorovic <
> > todorovic.s at googlemail.com> wrote:
> >
> >> On 21/09/2009, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
> >>
> >> > Can u please help how i paint the textbrowser Text ?
> >>
> >> Like so:
> >>
> >> QString h("hello!");
> >> painter.drawText ( 50, 50, h );
> >>
> >> yes?
> >>
> >> Srdjan
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090921/1a0dab65/attachment.html 


More information about the Qt-interest-old mailing list