From 8eea80e068a15c0d373a0526498b3839df03d2ac Mon Sep 17 00:00:00 2001 From: David Cattermole Date: Tue, 23 Jun 2020 09:13:03 +0930 Subject: [PATCH] Add user-draggable 'splitter' between Object and Attribute widgets. --- .../mmSolver/tools/solver/ui/solver_layout.py | 5 + .../mmSolver/tools/solver/ui/solver_layout.ui | 141 ++++++++++-------- 2 files changed, 81 insertions(+), 65 deletions(-) diff --git a/python/mmSolver/tools/solver/ui/solver_layout.py b/python/mmSolver/tools/solver/ui/solver_layout.py index 47bfd3725..82f292205 100644 --- a/python/mmSolver/tools/solver/ui/solver_layout.py +++ b/python/mmSolver/tools/solver/ui/solver_layout.py @@ -48,6 +48,11 @@ def __init__(self, parent=None, *args, **kwargs): self.ui = ui_solver_layout.Ui_Form() self.ui.setupUi(self) + # Set the sizing for the Attribute and Object frames, so that + # the Splitter will start out with a 50/50 ratio of Objects + # to Attributes. + self.ui.objectAttribute_splitter.setSizes([50, 50]) + # Store the parent window class, so we can set the applyBtn enabled # state. self._parentObject = parent diff --git a/python/mmSolver/tools/solver/ui/solver_layout.ui b/python/mmSolver/tools/solver/ui/solver_layout.ui index 0b486d0a5..8af0b0b9b 100644 --- a/python/mmSolver/tools/solver/ui/solver_layout.ui +++ b/python/mmSolver/tools/solver/ui/solver_layout.ui @@ -47,7 +47,7 @@ - + 1 @@ -55,78 +55,89 @@ QLayout::SetDefaultConstraint - - - QFrame::StyledPanel + + + Qt::Horizontal - - QFrame::Raised + + 10 - - - 1 + + + + 0 + 0 + - - 0 + + QFrame::StyledPanel - - 0 + + QFrame::Raised - - 0 + + + 1 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + + + + + + + 0 + 0 + - - 0 + + QFrame::StyledPanel - - - - 1 - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 1 + + QFrame::Raised - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - - - - - - - - Qt::Vertical - + + + 1 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + + +