Skip to content

Commit

Permalink
fix: can not auto adjust dialog position
Browse files Browse the repository at this point in the history
Change-Id: Iafbd7a681c989e1de08fea012da34beb5982bc52
  • Loading branch information
zccrs committed Mar 19, 2018
1 parent 3927d44 commit c487b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/dabstractdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c487b5c

Please sign in to comment.