I try to draw a line using the following code:
bool ok;
QPainter p;
ok=p.begin(this);
QColor qcred(Qt::red);
p.setPen(qcred);
p.drawLine(10, 80, 90, 20);
p.end();
ok has the value true.
However, I don't see a line drawn. How do I solve this?
Daan
I try to draw a line using the following code:
bool ok;
QPainter p;
ok=p.begin(this);
QColor qcred(Qt::red);
p.setPen(qcred);
p.drawLine(10, 80, 90, 20);
p.end();
ok has the value true.
However, I don't see a line drawn. How do I solve this?
Daan
what is "this"? can you show us some little more code? And eventually the coordinates of your line are outside the visible area of your widget(or whatever you use.)
Bookmarks