summaryrefslogtreecommitdiffstats
path: root/tests/manual/quick/pdf/simplest.qml
blob: 3f39bb21341d972df9791339cfcc940615047da0 (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 BSD-3-Clause
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--
    }
}