[Qt-interest] Problem with QPainter

Vijay Kansal vijaykansal3 at gmail.com
Sat Jul 24 12:55:19 CEST 2010


Hi,
I was just beginning to use QPainter and this my sorce code :

        QLine line( 0, 10, 10, 10 );

    QPen pen( Qt::blue, 10 );

    QPainter painter;

    painter.begin(wave->device));

    painter.drawLine(line);


wave->device is a pointer to a QPushButton object.
painter.begin is returning false and at the application output i could see
the statment

      QPainter::begin: Paint device returned engine == 0, type: 1

I am unable to make out why my painter object is unable to begin
Is there anything wrong with my source code.
Please help.
I am using Windows XP .

-- 
vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100724/6f70090e/attachment.html 


More information about the Qt-interest-old mailing list