diff options
author | hjk <hjk@qt.io> | 2023-04-27 08:24:43 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-05-03 13:44:02 +0000 |
commit | 70b02d23e1a32a1c4911644cb73b7247430a4416 (patch) | |
tree | c464816c62fd74a30cf0b00ad74ede6e05117407 /src/plugins/scxmleditor | |
parent | 3face235d958b6601288f7d4675c39dbcf7559f7 (diff) |
LayoutBuilder: Rework
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.
Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).
No direct access to the widget in creation, funnel out is
via the new bindTo() facility.
Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/scxmleditor')
-rw-r--r-- | src/plugins/scxmleditor/common/navigatorslider.cpp | 3 | ||||
-rw-r--r-- | src/plugins/scxmleditor/common/search.cpp | 3 | ||||
-rw-r--r-- | src/plugins/scxmleditor/common/shapestoolbox.cpp | 3 | ||||
-rw-r--r-- | src/plugins/scxmleditor/common/stateview.cpp | 6 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/scxmleditor/common/navigatorslider.cpp b/src/plugins/scxmleditor/common/navigatorslider.cpp index 68d74dd1bed..dd45a1c8af4 100644 --- a/src/plugins/scxmleditor/common/navigatorslider.cpp +++ b/src/plugins/scxmleditor/common/navigatorslider.cpp @@ -31,11 +31,12 @@ NavigatorSlider::NavigatorSlider(QWidget *parent) using namespace Layouting; Row { + spacing(0), zoomOut, m_slider, zoomIn, Space(20), - }.setSpacing(0).attachTo(this, WithoutMargins); + }.attachTo(this, WithoutMargins); connect(zoomOut, &QToolButton::clicked, this, &NavigatorSlider::zoomOut); connect(zoomIn, &QToolButton::clicked, this, &NavigatorSlider::zoomIn); diff --git a/src/plugins/scxmleditor/common/search.cpp b/src/plugins/scxmleditor/common/search.cpp index 34f26017333..b7b56295fd5 100644 --- a/src/plugins/scxmleditor/common/search.cpp +++ b/src/plugins/scxmleditor/common/search.cpp @@ -47,9 +47,10 @@ Search::Search(QWidget *parent) using namespace Layouting; Column { + spacing(0), m_searchEdit, m_searchView, - }.setSpacing(0).attachTo(this, WithoutMargins); + }.attachTo(this, WithoutMargins); connect(m_searchEdit, &Utils::FancyLineEdit::textChanged, this, &Search::setSearchText); connect(m_searchView, &TableView::pressed, this, &Search::rowActivated); diff --git a/src/plugins/scxmleditor/common/shapestoolbox.cpp b/src/plugins/scxmleditor/common/shapestoolbox.cpp index 1343859cc62..a0354d0bce4 100644 --- a/src/plugins/scxmleditor/common/shapestoolbox.cpp +++ b/src/plugins/scxmleditor/common/shapestoolbox.cpp @@ -31,8 +31,9 @@ ShapesToolbox::ShapesToolbox(QWidget *parent) using namespace Layouting; Column { + spacing(0), scrollArea, - }.setSpacing(0).attachTo(this, WithoutMargins); + }.attachTo(this, WithoutMargins); } void ShapesToolbox::setUIFactory(ScxmlEditor::PluginInterface::ScxmlUiFactory *factory) diff --git a/src/plugins/scxmleditor/common/stateview.cpp b/src/plugins/scxmleditor/common/stateview.cpp index 57759263fd4..e4c23046c7f 100644 --- a/src/plugins/scxmleditor/common/stateview.cpp +++ b/src/plugins/scxmleditor/common/stateview.cpp @@ -38,8 +38,10 @@ StateView::StateView(StateItem *state, QWidget *parent) }.attachTo(titleBar, WithoutMargins); Column { - titleBar, m_graphicsView - }.setSpacing(0).attachTo(this, WithoutMargins); + spacing(0), + titleBar, + m_graphicsView + }.attachTo(this, WithoutMargins); initScene(); } |