aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qmldesigner/studio_templates/projects/common/App.qml.tpl
blob: 21794f23e9f3327e7602dd6ad71b07396da96c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0

import QtQuick %{QtQuickVersion}
import QtQuick.Window %{QtQuickVersion}
import %{ImportModuleName} %{ImportModuleVersion}
@if %{UseVirtualKeyboard}
import QtQuick.VirtualKeyboard %{QtQuickVersion}
@endif

Window {
    width: mainScreen.width
    height: mainScreen.height

    visible: true
    title: "%{ProjectName}"

    %{UIClassName} {
        id: mainScreen
    }

@if %{UseVirtualKeyboard}
    InputPanel {
        id: inputPanel
        property bool showKeyboard :  active
        y: showKeyboard ? parent.height - height : parent.height
        Behavior on y {
            NumberAnimation {
                duration: 200
                easing.type: Easing.InOutQuad
            }
        }
        anchors.leftMargin: Constants.width/10
        anchors.rightMargin: Constants.width/10
        anchors.left: parent.left
        anchors.right: parent.right
    }
@endif
}