It was an openGL issue. I forgot to add a
glViewport(0, 0, width, height);
glViewport(0, 0, width, height);
To copy to clipboard, switch view to plain text mode
in my resizeGL() code before:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, (double)width, 0.0, (double)height, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, (double)width, 0.0, (double)height, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
To copy to clipboard, switch view to plain text mode
and then the drawing does start in the lower lefthand corner (0,0) as expected.
Bookmarks