diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-04-28 21:00:56 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-04-30 08:32:20 +0200 |
commit | c0b3f3dfac45b101a097188fa6f570ca0616bdb9 (patch) | |
tree | 00e7202c2b6bb506776a2564b3412c80198b737f /examples | |
parent | 267e47201cac8e3b30dc7af1dad2ea5d29723505 (diff) |
PDF multipage example: add sidebar metadata pane
Change-Id: I33a365a1591565bc2a95c6ae62382c71c7e1850b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pdf/multipage/viewer.qml | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/examples/pdf/multipage/viewer.qml b/examples/pdf/multipage/viewer.qml index c4561ef88..3d302910c 100644 --- a/examples/pdf/multipage/viewer.qml +++ b/examples/pdf/multipage/viewer.qml @@ -256,7 +256,10 @@ ApplicationWindow { x: -width rotation: -90 transformOrigin: Item.TopRight - currentIndex: 1 // bookmarks by default + currentIndex: 2 // bookmarks by default + TabButton { + text: qsTr("Info") + } TabButton { text: qsTr("Search Results") } @@ -275,6 +278,32 @@ ApplicationWindow { StackLayout { anchors.fill: parent currentIndex: sidebarTabs.currentIndex + component InfoField: TextInput { + width: parent.width + selectByMouse: true + readOnly: true + wrapMode: Text.WordWrap + } + Column { + spacing: 6 + width: parent.width - 6 + Label { font.bold: true; text: qsTr("Title") } + InfoField { text: doc.title } + Label { font.bold: true; text: qsTr("Author") } + InfoField { text: doc.author } + Label { font.bold: true; text: qsTr("Subject") } + InfoField { text: doc.subject } + Label { font.bold: true; text: qsTr("Keywords") } + InfoField { text: doc.keywords } + Label { font.bold: true; text: qsTr("Producer") } + InfoField { text: doc.producer } + Label { font.bold: true; text: qsTr("Creator") } + InfoField { text: doc.creator } + Label { font.bold: true; text: qsTr("Creation date") } + InfoField { text: doc.creationDate } + Label { font.bold: true; text: qsTr("Modification date") } + InfoField { text: doc.modificationDate } + } ListView { id: searchResultsList implicitHeight: parent.height |