Honour QSizePolicy::Fixed too

Some widgets, for example QPushButton, instead of having an explicit max size,
they communicate the need for a max size through their size policy
This commit is contained in:
Sergio Martins
2020-06-07 19:53:06 +01:00
parent ab8545e2c2
commit d5797a3aea
8 changed files with 107 additions and 6 deletions

View File

@@ -226,6 +226,7 @@ void DockWidgetBase::setWidget(QWidget *w)
qCDebug(addwidget) << Q_FUNC_INFO << w;
d->widget = w;
setSizePolicy(w->sizePolicy());
Q_EMIT widgetChanged(w);
setWindowTitle(uniqueName());
}