[Qt-interest] Fwd: Re: adding another item in QGraphicsItem

Sean Harmer sean.harmer at maps-technology.com
Sat Apr 25 12:51:28 CEST 2009


Forwarding to list. Sorry I didn't check the reply-to address...
----------  Forwarded Message  ----------

Subject: Re: [Qt-interest] adding another item in QGraphicsItem
Date: Saturday 25 Apr 2009
From: Sean Harmer <sean.harmer at maps-technology.com>
To: chandrasekar wagmare <sekarwagmare at gmail.com>

On Saturday 25 April 2009 10:34:25 you wrote:
> thanks for reply ..
>
>  if we paint will it overwrite the item..? because the item should be a
> rectangle with brush of blue color and will it over write the
> QGraphicsTextItem() .....
Just try it. Child items get drawn on top of their parents. Please read the 
docs and examples for QGraphicsItem.

Another alternative is to simply use QPainter::drawText() in your custom 
item's paint() function. Either way will work. It depends if QGraphicsTextItem 
satisfies your requirements.

Sean


-------------------------------------------------------



More information about the Qt-interest-old mailing list