Changeset View
Changeset View
Standalone View
Standalone View
examples/simpleexamples/SplitDrawer.qml
Show All 14 Lines | |||||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 1.4 as Controls | 21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Layouts 1.2 | 22 | import QtQuick.Layouts 1.2 | ||
23 | import org.kde.kirigami 1.0 as Kirigami | 23 | import org.kde.kirigami 2.0 as Kirigami | ||
24 | 24 | | |||
25 | Kirigami.ApplicationWindow { | 25 | Kirigami.ApplicationWindow { | ||
26 | id: root | 26 | id: root | ||
27 | width: Kirigami.Units.gridUnit * 60 | 27 | width: Kirigami.Units.gridUnit * 60 | ||
28 | height: Kirigami.Units.gridUnit * 40 | 28 | height: Kirigami.Units.gridUnit * 40 | ||
29 | 29 | | |||
30 | 30 | | |||
31 | pageStack.initialPage: mainPageComponent | 31 | pageStack.initialPage: mainPageComponent | ||
32 | globalDrawer: Kirigami.SplitDrawer { | 32 | globalDrawer: Kirigami.SplitDrawer { | ||
33 | id: drawer | 33 | id: drawer | ||
34 | opened: true | 34 | drawerOpen: true | ||
35 | //modal: false | 35 | //modal: false | ||
36 | contentItem: Column { | 36 | contentItem: Column { | ||
37 | //implicitWidth: Kirigami.Units.gridUnit * 10 | 37 | //implicitWidth: Kirigami.Units.gridUnit * 10 | ||
38 | 38 | | |||
39 | Kirigami.Label { | 39 | Kirigami.Label { | ||
40 | anchors.horizontalCenter: parent.horizontalCenter | 40 | anchors.horizontalCenter: parent.horizontalCenter | ||
41 | text: "This is a sidebar" | 41 | text: "This is a sidebar" | ||
42 | width: parent.width - Kirigami.Units.smallSpacing * 2 | 42 | width: parent.width - Kirigami.Units.smallSpacing * 2 | ||
Show All 18 Lines |