From 75fa1b41ff4dee251099b443dbd8b26c622dfc17 Mon Sep 17 00:00:00 2001 From: Joonalai Date: Mon, 26 Jun 2023 13:02:41 +0300 Subject: [PATCH] fix: move msg box to top left corner [#38] --- src/pytest_qgis/pytest_qgis.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pytest_qgis/pytest_qgis.py b/src/pytest_qgis/pytest_qgis.py index 221c943..e16e511 100644 --- a/src/pytest_qgis/pytest_qgis.py +++ b/src/pytest_qgis/pytest_qgis.py @@ -390,10 +390,7 @@ def _configure_qgis_map( f"It will close automatically in {settings.timeout} seconds." ) message_box.addButton(QMessageBox.Close) - message_box.move( - message_box.mapToGlobal(qgis_parent.rect().topLeft()) - - QtCore.QPoint(message_box.width(), 0) - ) + message_box.move(QgsApplication.instance().primaryScreen().geometry().topLeft()) message_box.setWindowModality(QtCore.Qt.NonModal) message_box.show()