From c487b5cb462709d42a4c9b0a9938a35037b0205a Mon Sep 17 00:00:00 2001 From: zccrs Date: Mon, 19 Mar 2018 17:06:41 +0800 Subject: [PATCH] fix: can not auto adjust dialog position Change-Id: Iafbd7a681c989e1de08fea012da34beb5982bc52 --- src/widgets/dabstractdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/dabstractdialog.cpp b/src/widgets/dabstractdialog.cpp index b8d7b9a3e..4c87a4f80 100644 --- a/src/widgets/dabstractdialog.cpp +++ b/src/widgets/dabstractdialog.cpp @@ -194,7 +194,7 @@ void DAbstractDialog::moveToTopRight() void DAbstractDialog::moveToTopRightByRect(const QRect &rect) { int x = rect.x() + rect.width() - width(); - move(QPoint(x, 0)); + QDialog::move(QPoint(x, 0)); } /** @@ -265,7 +265,7 @@ void DAbstractDialog::moveToCenterByRect(const QRect &rect) { QRect qr = geometry(); qr.moveCenter(rect.center()); - move(qr.topLeft()); + QDialog::move(qr.topLeft()); } void DAbstractDialog::mousePressEvent(QMouseEvent *event)