Commit 1c56622f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Style KCM] Set implicit size after show

Most of the widgets used in the preview initialize only on show, making the size hint invalid before it shows.
It isn't used but just for completeness' sake.

Differential Revision: https://phabricator.kde.org/D25688
parent 759cec46
......@@ -151,15 +151,15 @@ void PreviewItem::reload()
m_widget->ensurePolished();
const auto sizeHint = m_widget->sizeHint();
setImplicitSize(sizeHint.width(), sizeHint.height());
m_widget->resize(qRound(width()), qRound(height()));
m_widget->installEventFilter(this);
m_widget->show();
const auto sizeHint = m_widget->sizeHint();
setImplicitSize(sizeHint.width(), sizeHint.height());
if (oldValid != isValid()) {
emit validChanged();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment