summaryrefslogtreecommitdiffstats
path: root/tests/manual/quick/pdf/simplest.qml
blob: 0736f38aee68cf828fd903c3417e5a468363d78e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick

Image {
    id: image
    source: "test.pdf"
    fillMode: Image.PreserveAspectFit
    Shortcut {
        sequence: StandardKey.MoveToNextPage
        enabled: image.currentFrame < image.frameCount - 1
        onActivated: image.currentFrame++
    }
    Shortcut {
        sequence: StandardKey.MoveToPreviousPage
        enabled: image.currentFrame > 0
        onActivated: image.currentFrame--
    }
}