Example from Qt.
Added implementation of bezier curves instead of direct lines.