Better create that painter in the paintEvent() method and don't forget to pass "this" as a parameter:
As an alternative solution you will have to use QPainter::begin() and QPainter::end().Qt Code:
{ paint.drawLine(10, 10, 50, 50); }To copy to clipboard, switch view to plain text mode





Reply With Quote
aintEvent...

Bookmarks