use qsurface instead of qsurfaceformat
continue on template painter