Show dialogs on screen center.

--HG--
branch : develop
This commit is contained in:
dismine 2014-07-08 15:01:20 +03:00
parent 354d722fd2
commit cf6260dd26
2 changed files with 8 additions and 0 deletions

View file

@ -44,6 +44,10 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
{
ui->setupUi(this);
QRect position = this->frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center());
move(position.topLeft());
{
const QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
SCASSERT(bOk != nullptr);

View file

@ -41,6 +41,10 @@ DialogStandardMeasurements::DialogStandardMeasurements(VContainer *data, const Q
{
ui->setupUi(this);
QRect position = this->frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center());
move(position.topLeft());
{
const QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
SCASSERT(bOk != nullptr);