diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index 99c6325a..a7dea792 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -53,7 +53,7 @@ void EditDialog::showEvent(QShowEvent*) { // Whenever the dialog is shown, position it at the center of the parent dialog QPoint center = mapToGlobal(rect().center()); - QDialog* parentDialog = qobject_cast(parent()); + QMainWindow* parentDialog = qobject_cast(parent()); if(parentDialog) { QPoint parentCenter = parentDialog->window()->mapToGlobal(parentDialog->window()->rect().center());