I solved it.
The problem was the rect I passed to the paintEvent. It must completely contain the 2 lines ( old and new ). Something like thisand pass r to the painteventQt Code:
To copy to clipboard, switch view to plain text mode
Regards,
Franco
Bookmarks