BusyIndicatorサンプル


BusyIndicatorのサンプル

テスト用QML

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtMultimedia 5.9

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: qsTr("BusyIndicatorサンプル")

    Audio { id: clickSound1; source: "Sounds/btn01.mp3" }
    Audio { id: clickSound2; source: "Sounds/btn02.mp3" }

    Column {
        BusyIndicator {
            id: busyIndicator
            running: false
        }

        Button {
            text: "Start"
            onClicked: {
                if (busyIndicator.running)  clickSound2.play()
                else                        clickSound1.play()
                busyIndicator.running = !busyIndicator.running
                text = busyIndicator.running ? "Stop" : "Start"
            }
        }
    }
}

う〜ん…もうちょっとリサイズ処理なんとかならないかな?^^;

実行結果

SignalTransitionサンプル動画
※Linux Mint 18.2 & Qt 5.9.1使用