Because you don't instantiate the member QPainter.
You have two options:
1. Add:
in the constructor, and:
in the destructor.
2. Remove the member( recommended ) and in paint event:
Qt Code:
painter.drawPolygon(polygoon);To copy to clipboard, switch view to plain text mode
Regards
Bookmarks