From 9075fe7fe228d14897f1f0e99dcab00400fe7341 Mon Sep 17 00:00:00 2001 From: Andrey Daragan <tl1989@gmail.com> Date: Thu, 19 Dec 2019 10:34:36 +0300 Subject: [PATCH] [+] The header and widget stack are added to the widget of the right panel. --- DapRightPanelForm.ui.qml | 45 ++++++++++++++++++---------------------- DapTabForm.ui.qml | 6 ++---- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/DapRightPanelForm.ui.qml b/DapRightPanelForm.ui.qml index ab1f4cc..679ab58 100644 --- a/DapRightPanelForm.ui.qml +++ b/DapRightPanelForm.ui.qml @@ -3,38 +3,33 @@ import QtQuick.Controls 2.0 Rectangle { id: dapRightPanel + property alias rightPanel: dapRightPanel -// property alias header: dapHeader -// property Rectangle headerData: undefined -// property alias childRightPanels: dapChildRightPanels - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.right: parent.right - width: 350 + property alias header: dapHeader + property Item headerData: Item { } + property alias childRightPanels: dapChildRightPanels + property Item contentItemPanel: Item { } + + rightPanel.anchors.top: parent.top + rightPanel.anchors.bottom: parent.bottom + rightPanel.anchors.right: parent.right - Rectangle + Item { id: dapHeader -// data: Rectangle -// { -// anchors.fill: parent - -// } + data: headerData anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right -// anchors.fill: parent - height: 30 - color: "blue" } -// StackView -// { -// id: dapChildRightPanels -// initialItem: parent -// anchors.top: dapHeader.bottom -// anchors.left: parent.left -// anchors.right: parent.right -// anchors.bottom: parent.bottom -// } + StackView + { + id: dapChildRightPanels + initialItem: contentItemPanel + anchors.top: dapHeader.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + } } diff --git a/DapTabForm.ui.qml b/DapTabForm.ui.qml index 29066ae..5c7045f 100644 --- a/DapTabForm.ui.qml +++ b/DapTabForm.ui.qml @@ -2,11 +2,10 @@ import QtQuick 2.4 import QtQuick.Controls 2.0 Page { - property DapTopPanelForm topPanelForm: undefined - property DapScreenForm screenForm: undefined + property DapTopPanelForm topPanelForm: DapTopPanelForm { } + property DapScreenForm screenForm: DapScreenForm { } property alias separator: dapSeparator property DapRightPanelForm rightPanelForm: DapRightPanelForm { } -// property alias childRightPanels: dapChildRightPanels anchors.fill: parent @@ -14,7 +13,6 @@ Page { contentItem: Rectangle { - anchors.fill: parent Item { -- GitLab