mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Interface mockup 9
This commit is contained in:
@@ -95,15 +95,22 @@ Panel::Panel(const QString& title, QWidget* content, QWidget* parent, bool has_s
|
||||
|
||||
auto* scroll_body = new QWidget(scroll);
|
||||
scroll_body->setObjectName("panelScrollBody");
|
||||
auto* scroll_body_layout = new QVBoxLayout(scroll_body);
|
||||
scroll_body_layout->setContentsMargins(0, 0, 0, 0);
|
||||
scroll_body_layout->setSpacing(0);
|
||||
scroll_body_layout->addWidget(content);
|
||||
body_layout_ = new QVBoxLayout(scroll_body);
|
||||
body_layout_->setContentsMargins(0, 0, 0, 0);
|
||||
body_layout_->setSpacing(0);
|
||||
|
||||
scroll->setWidget(scroll_body);
|
||||
frame_layout->addWidget(scroll);
|
||||
} else {
|
||||
frame_layout->addWidget(content);
|
||||
auto* body = new QWidget(frame);
|
||||
body_layout_ = new QVBoxLayout(body);
|
||||
body_layout_->setContentsMargins(0, 0, 0, 0);
|
||||
body_layout_->setSpacing(0);
|
||||
frame_layout->addWidget(body);
|
||||
}
|
||||
|
||||
if (content) {
|
||||
body_layout_->addWidget(content);
|
||||
}
|
||||
outer_layout->addWidget(frame);
|
||||
|
||||
@@ -115,4 +122,8 @@ Panel::Panel(const QString& title, QWidget* content, QWidget* parent, bool has_s
|
||||
setWidget(outer);
|
||||
}
|
||||
|
||||
void Panel::addBodyWidget(QWidget* widget) {
|
||||
body_layout_->addWidget(widget);
|
||||
}
|
||||
|
||||
} // namespace ifcinterface::components
|
||||
|
||||
Reference in New Issue
Block a user