C++ (Qt)waitDialog = new QDialog (0); waitDialog->setModal(true); waitDialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint); QHBoxLayout *layout = new QHBoxLayout(waitDialog); QLabel *label = new QLabel (waitDialog); label->setText(message); layout->addWidget(label); waitDialog->setLayout(layout); waitDialog->show();
waitDialog->show();
waitDialog->exec();
C++ (Qt)widget->move( (QApplication::desktop()->width() - widget->width()) / 2, (QApplication::desktop()->height() - widget->height()) / 2 );
C++ (Qt) QRect r( 0, 0, width(), height() ); // Window rectangle move(QApplication::desktop()->screenGeometry().center() - r.center());
C++ (Qt)move(qApp->desktop()->availableGeometry().center()-rect().center());