Is it possible to disable/delete the QDialogs default close button at the upper left of the dialog?
Use this function for your dialog
dlgLobLobLob->setWindowFlags(Qt::Dialog | Qt::Desktop)