Add default layout to collapsible group

This commit is contained in:
Dan Paulat 2023-06-27 23:35:09 -05:00
parent 106542e28a
commit 396f64f0d4
3 changed files with 9 additions and 2 deletions

View file

@ -56,6 +56,11 @@ void CollapsibleGroupImpl::Initialize()
self_->Expand();
}
QLayout* CollapsibleGroup::GetContentsLayout()
{
return ui->contentsFrame->layout();
}
void CollapsibleGroup::SetContentsLayout(QLayout* layout)
{
ui->contentsFrame->setLayout(layout);

View file

@ -25,6 +25,7 @@ public:
explicit CollapsibleGroup(const QString& title, QWidget* parent = nullptr);
~CollapsibleGroup();
QLayout* GetContentsLayout();
void SetContentsLayout(QLayout* contents);
void SetTitle(const QString& title);

View file

@ -79,6 +79,7 @@
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" name="contentsLayout"/>
</widget>
</item>
</layout>