If a child QDialog is created before its parent is added into a layout (i.e., as added to a QTabWidget), the dialog's WA_Moved attribute gets set in the process, and it therefore does not end up calling adjustPosition(parentWidget()) as it should when QDialog::setVisible() runs.
This happens because qwidget_win.cpp's implementation of QWidgetPrivate::reparentChildren() attempts to save and restore the position of child widgets that have isWindow()==true. To do this, it saves w->pos(), then calls w->move(old_pos) even though the window had not previously been moved, which sets WA_Moved. I think it should do this only if testAttribute(WA_Moved) is true, and leave the location unset otherwise.
The attached example project demonstrates the bug: the first tab (created before MainWindow is originally shown/laid out) centers its dialog correctly when you click on "Push Me", but subsequent tabs added to the already running tabwidget (created by hitting "New Tab") pop up at 0,0 instead.
The bug seems to no longer be reproducible in Qt 5.0.1, but I was not able to track down the specific change that fixed it, since qwidget_win seems to have been broken up into and moved out of qtbase/gui/kernel.