vijay_kansal
24th July 2010, 12:10
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 .
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 .