#include int main(int argc, char **argv) { QApplication app(argc, argv); QWidget w; w.resize(500, 500); w.show(); auto w2 = new QWidget(); w2->setWindowModality(Qt::ApplicationModal); w2->resize(200, 200); w2->show(); qApp->setOverrideCursor(Qt::SizeAllCursor); return app.exec(); }