Bezier curves implementation with Qt (c++)