add book
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) Daniel Gakwaya.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: rootId
|
||||
property alias buttonText: buttonTextId.text
|
||||
width: containerRectId.width
|
||||
height: containerRectId.height
|
||||
signal buttonClicked
|
||||
|
||||
Rectangle {
|
||||
id: containerRectId
|
||||
width: buttonTextId.implicitWidth + 20
|
||||
height: buttonTextId.implicitHeight + 20
|
||||
color: "red"
|
||||
border { color: "blue"; width : 3}
|
||||
|
||||
Text {
|
||||
id: buttonTextId
|
||||
text: "Button"
|
||||
anchors.centerIn: parent
|
||||
onTextChanged: {
|
||||
console.log("Text changed to "+ buttonTextId.text)
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
//console.log("Clicked on :"+ buttonTextId.text)
|
||||
rootId.buttonClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user