I have a program composed of a QMainWindow with a QGLWidget as its central widget. When I resize the main window, QGLWidget::resizeGL() is triggered (however, I currently have it do absolutely nothing). This is also visually displayed by the "background" of the MainWindow remaining as the QGLWidget's background color. As well, moving the mouse in the "new" parts of the widget triggers QGLWidget::mouseMoveEvent().
However, the drawing isn't rescaled. Indeed, the image remains in its original scale and position, regardless of the resize event. As well, the "drawable" area of the QGLWidget isn't altered either. If I increase the main window and then translate an image (whether the image was opened before or after the resizing) to the "new" areas of the widget, it gets clipped at the original limits of the widget. I'm not even sure what code snippets to present because I don't know what could be causing this. As I've said, my ::resizeGL() is completely empty. If I change it to basically
{
this->resize(w,h);
}
QGLWidget::resizeGL(int w, int h)
{
this->resize(w,h);
}
To copy to clipboard, switch view to plain text mode
nothing changes.
Does QGLWidget have some "drawable" section I'm unaware of that doesn't get automatically resized?
I've attached an image showing the problem, in case I didn't explain it well enough. The original size was the same as that clipping area, while the expanded area isn't drawable.
image.jpg
Bookmarks