The problem is that if you set a fixed size (either by calling setFixedSize or layout()->setSizeConstraint(QLayout::SetFixedSize). The titlebar of the dialog is going o be completely frozen. The buttons don't react on mouse hover and can't be clicked.
Strangely this seems to be happening only on some windows 7 (not all, and windows 10 is fine) both on VM and real hardware.
I could work around this for normal dialogs but I still have the issue with QMessageBox.