shivendra46d
4th March 2014, 11:15
I am trying to draw text and m using the following code
QPainter paint(this);
QPen pen(QColor::QColor(255,128,00,255));
paint.setPen(pen);
paint.setViewport(0,0,widget_width,widget_height);
paint.scale(1,-1);
paint.setWindow(-widget_width /2,-widget_height/2,widget_width,widget_height);
paint.drawText(QRectF(100,75,100,75),"Hello Qt");
but problem is that when i am doing it it is drawing it up side down how can i draw it properly
QPainter paint(this);
QPen pen(QColor::QColor(255,128,00,255));
paint.setPen(pen);
paint.setViewport(0,0,widget_width,widget_height);
paint.scale(1,-1);
paint.setWindow(-widget_width /2,-widget_height/2,widget_width,widget_height);
paint.drawText(QRectF(100,75,100,75),"Hello Qt");
but problem is that when i am doing it it is drawing it up side down how can i draw it properly