对界面UI设置以下:

setWindowFlags(Qt::WindowCloseButtonHint | Qt::MSWindowsFixedSizeDialogHint);

转自https://blog.csdn.net/schoger/article/details/42552945