MDI windows are almost always meant to be resized. So like Franzk says: best is to make sure you handle that case.
Anyway, what happens if you modify your code like this:
@
MyWidget * w=new MyWidget(this);
QMdiSubWindow* subwindow = ui->mdiArea->addSubWindow(w);
w->show();
subwindow->setGeometry(subwindow->geometry().x(),subwindow->geometry().y(),348,500);
@
Note that you will probably need to adjust the size a bit, because the style adds borders. This size will be different per style, so you will have to figure out the adjustment in some dynamic way.