I want to move the Cancel button of QProgressDialog
to the center; by default its on the left.
Below is a simple example, but I don't know how to change the button position.
_progress = new QProgressDialog();
_progress->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
_progress->setWindowTitle(tr("Stimulated Movement"));
_progress->setLabelText(tr("Please wait for a moment while the motor is moving!"));
_progress->setAttribute(Qt::WA_DeleteOnClose);
_progress->setModal(true);
//make it Keep rolling
_progress->setRange(0, 0);
_progress->setCancelButton(new QPushButton(tr("Terminate")));