What do you like to draw exactly? Do you like to draw a line on an existing widget?
Then you have to re-implement the paintEvent()-Method in a subclass of the widget. You can call Subclass:aintEvent(event); to draw the widget and then use QPainter to draw extra stuff on it...
It is possible to write your own paint()-Funktion but you have to call it from the paintEvent()-Method, otherwise it will not work out.
Bookmarks