[Qt-interest] New for QPainter and QGraphicItemView
Chandru...
sekarwagmare at gmail.com
Fri Jul 3 08:20:42 CEST 2009
if u want to paint in QGraphicsView ...
there are two ways ...
1=>painting directly in QGraphicsScene()
void GraphicsView::drawBackground(QPainter *painter, const QRectF &rect)
2=> customizing QGraphicsItems and painting over the items
void GraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
*, QWidget *)
have a good day ...
On 7/3/09, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
>
> Hi All
>
> Since 2 months i am using QT...
>
> Upto now i don't use the QPainter and QGraphicView
>
> Now i am learning the both things how use it..
>
> I want to drawellipse in my graphicitemview Widget
>
>
> Qpainter *painter = new Qpainter (ui->graphicView);
>
> painter->setBrush(Qt::cyan);
>
> painter->drawEllipse(-10, -20, 20, 40);
>
>
>
>
>
> if i build this code , nothing i am getting in graphicview widget..
>
>
>
>
>
>
>
> what mistake is there
>
>
>
> please suggest me
>
>
>
>
>
> Thanks
>
>
>
> Yuvaraj R
>
> _______________________________________________
> 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/20090703/4b612b79/attachment.html
More information about the Qt-interest-old
mailing list