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 name: "Hello.refnb" |
| 9 | property alias containsMouse: mouseArea.containsMouse |
| 10 | signal clicked() |
| 11 | |
| 12 | Image { |
| 13 | id: nbIcon |
| 14 | width: 100 |
| 15 | height: 100 |
| 16 | source: "qrc:///icons/document.svg" |
| 17 | fillMode: Image.PreserveAspectFit |
| 18 | } |
| 19 | |
| 20 | Label { |
| 21 | text: name |
| 22 | Layout.fillWidth: true |
| 23 | |
| 24 | MouseArea { |
| 25 | id: mouseArea |
| 26 | |
| 27 | anchors.fill: parent |
| 28 | hoverEnabled: true |
| 29 | |
| 30 | onClicked: root.clicked() |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | /*##^## |
| 36 | Designer { |
| 37 | D{i:0;autoSize:true;height:24;width:300} |
| 38 | } |
| 39 | ##^##*/ |