You can hide close button of every window by clearing an appropriate flag:
With Qt 5.0
QProgressDialog dlg;
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowCloseButtonHint);
Qt::WindowCloseButtonHint 0x08000000 Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
With earlier versions
QProgressDialog dlg;
dlg.setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
where
Qt::Window
stands for windowQt::WindowTitleHint
stands for displaying title on the top of the windowQt::CustomizeWindowHint
stands for not displaying buttons