From 148a25816047dbc351356813646ecbd62481d8d2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 2 Jul 2019 16:26:05 +0200 Subject: [PATCH] bad contentsSizeHint implementation relying on the current size fixed --- src/dialogs/QskDialogSubWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dialogs/QskDialogSubWindow.cpp b/src/dialogs/QskDialogSubWindow.cpp index 580b742b..0d0a3776 100644 --- a/src/dialogs/QskDialogSubWindow.cpp +++ b/src/dialogs/QskDialogSubWindow.cpp @@ -490,11 +490,11 @@ QSizeF QskDialogSubWindow::contentsSizeHint() const h += hint.height() + m.top() + m.bottom(); } - const auto innerSize = layoutRect().size(); - const auto outerSize = size(); + const qreal sz = 400.0; // something + const auto innerSize = layoutRectForSize( QSizeF( sz, sz ) ).size(); - w += outerSize.width() - innerSize.width(); - h += outerSize.height() - innerSize.height(); + w += sz - innerSize.width(); + h += sz - innerSize.height(); return QSizeF( w, h ); }