Changeset View
Changeset View
Standalone View
Standalone View
src/data/contents/ui/gallery/FormLayoutGallery.qml
1 | 1 | | |||
---|---|---|---|---|---|
2 | 2 | | |||
3 | import QtQuick 2.6 | 3 | import QtQuick 2.6 | ||
4 | import QtQuick.Layouts 1.2 | 4 | import QtQuick.Layouts 1.2 | ||
5 | import QtQuick.Controls 2.2 | 5 | import QtQuick.Controls 2.2 | ||
6 | import org.kde.kirigami 2.4 as Kirigami | 6 | import org.kde.kirigami 2.4 as Kirigami | ||
7 | import "components" | ||||
7 | 8 | | |||
8 | Kirigami.ScrollablePage { | 9 | Kirigami.ScrollablePage { | ||
10 | id: page | ||||
9 | title: "Form Layout" | 11 | title: "Form Layout" | ||
10 | 12 | | |||
13 | actions.main: Kirigami.Action { | ||||
14 | iconName: "documentinfo" | ||||
15 | text: qsTr("Info") | ||||
16 | checkable: true | ||||
17 | onCheckedChanged: sheet.sheetOpen = checked; | ||||
18 | shortcut: "Alt+I" | ||||
19 | } | ||||
20 | | ||||
21 | //Close the drawer with the back button | ||||
22 | onBackRequested: { | ||||
23 | if (sheet.sheetOpen) { | ||||
24 | event.accepted = true; | ||||
25 | sheet.close(); | ||||
26 | } | ||||
27 | } | ||||
28 | | ||||
29 | InfoSheet { | ||||
30 | id: sheet | ||||
31 | | ||||
32 | page: page | ||||
33 | component: "FormLayoutGallery" | ||||
34 | } | ||||
35 | | ||||
11 | Kirigami.FormLayout { | 36 | Kirigami.FormLayout { | ||
12 | id: layout | 37 | id: layout | ||
13 | 38 | | |||
14 | TextField { | 39 | TextField { | ||
15 | Kirigami.FormData.label: "Label:" | 40 | Kirigami.FormData.label: "Label:" | ||
16 | } | 41 | } | ||
17 | TextField { | 42 | TextField { | ||
18 | } | 43 | } | ||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |