swissChili | d2af6ad | 2022-04-16 14:42:17 -0700 | [diff] [blame] | 1 | import QtQuick 2.0 |
| 2 | import QtQuick.Layouts 1.12 |
| 3 | import QtQuick.Controls 2.0 |
| 4 | |
| 5 | RowLayout { |
| 6 | id: root |
| 7 | |
| 8 | property string title: "title" |
| 9 | property string url: "https://swisschili.sh" |
| 10 | property alias containsMouse: mouseArea.containsMouse |
| 11 | |
| 12 | Image { |
| 13 | id: nbIcon |
| 14 | width: 100 |
| 15 | height: 100 |
| 16 | source: "qrc:///icons/book.svg" |
| 17 | fillMode: Image.PreserveAspectFit |
| 18 | } |
| 19 | |
| 20 | Label { |
| 21 | text: title |
| 22 | Layout.fillWidth: true |
| 23 | |
| 24 | MouseArea { |
| 25 | id: mouseArea |
| 26 | |
| 27 | anchors.fill: parent |
| 28 | hoverEnabled: true |
| 29 | |
| 30 | onClicked: Qt.openUrlExternally(url) |
| 31 | } |
| 32 | } |
| 33 | } |