diff --git a/dialog.cpp b/dialog.cpp index 769aff957..cbe874776 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -337,7 +337,7 @@ void Dialog::syncToGraphicsWidget() QDesktopWidget *desktop = QApplication::desktop(); QSize maxSize = desktop->availableGeometry(desktop->screenNumber(this)).size(); - graphicsWidget->setMaximumSize(maxSize - QSize(left + right, top + bottom)); + graphicsWidget->setMaximumSize(maxSize - QSize(left + right, top + bottom).boundedTo(graphicsWidget->effectiveSizeHint(Qt::MaximumSize).toSize())); setMinimumSize(-1, -1); setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);