If you opened the painter on a wrong object you should have received a warning. Take my code and change "viewport()" to "this", run the application and look at the console.
Yes, You are saying true in this regard; but I am telling about the below mentioned code.
Qt Code:
{ painter.setPen(Qt::blue); painter.drawLine(rect().topLeft(),rect().bottomRight()); }To copy to clipboard, switch view to plain text mode
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
You said you "forgot to call viewport()". I understood that you didn't open a painter on it.
Bookmarks