GlWidgets interfere with each other

I have a stacked widget in mainwindow with a second stacked widget on the second page of the mainwindow stackedwidget.

On the first page (of that second stacked widget) there is a glwidget for viewing objects in 3D;
On the second page there is a glwidget for viewing objects in 2D;

I made two widgets and promoted them to glwidgets...

Now they seem to share the same matrix stack;
when I call the modelview/projection matrices the other widget gets changed as well.

There are 2 pushbuttons to change between the 3D and 2D view, the problem is that resizeGL doesn't get called every time so the view is distorted when i switch.

I thought I could make a second resize funct give it the width() and height() and call it when the pushbutton to change between the views gets pressed.
Well the funct works but the widget doesn't take mouse input until i resize the window.

Is there a way to separate the widgets completely?

This is the first widget
@
GLWidget::GLWidget(QWidget *parent) :
QGLWidget(parent)
{

Just a guess, but it sounds like the OpenGL context of the two widgets isn't getting set correctly. Why don't you add a makeCurrent() to both glwidget's various methods to make sure commands executed in one glwidget are not sent to the other's context on the graphics card?