C

Qt Quick Ultralite map example

// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
import QtQuick

Item {
    id: root

    signal buttonClicked
    property color backgroundColor
    property string imageSource

    MouseArea {
        anchors.fill: parent
        Rectangle {
            anchors.fill: parent
            color: backgroundColor
            Image {
                width: 24
                height: 24
                anchors.centerIn: parent
                source: imageSource
            }
        }
        onClicked: buttonClicked()
    }
}