Skip to content
Snippets Groups Projects
Commit bfa12a66 authored by Pouchet Pierre's avatar Pouchet Pierre
Browse files

bouton, liste

parent ebfdaeaa
No related branches found
No related tags found
No related merge requests found
import QtQuick
Item {
width: 400
height: 200
property alias _textText: _text.text
Rectangle {
id: rectangle
x: 0
y: 0
width: 400
height: 200
color: "#db8f41"
Text {
id: _text
x: 0
y: 0
width: 400
height: 200
text: qsTr("Text")
font.pixelSize: 50
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
...@@ -19,6 +19,7 @@ qt_add_qml_module(appMotus ...@@ -19,6 +19,7 @@ qt_add_qml_module(appMotus
Main.qml Main.qml
RESOURCES Ressources.qrc RESOURCES Ressources.qrc
QML_FILES Case.qml QML_FILES Case.qml
QML_FILES Bouton.qml
) )
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
......
...@@ -12,23 +12,30 @@ Window { ...@@ -12,23 +12,30 @@ Window {
y: 0 y: 0
width: 1920 width: 1920
height: 1080 height: 1080
color: "#f56363" color: "#5f97af"
focus: true focus: true
Case { Case {
id: case1 id: case1
x: 225 x: 99
y: 647 y: 381
_textText: "A" _textText: "A"
} }
Case { Case {
id: case2 id: case2
x: 945 x: 201
y: 736 y: 372
_textText: "B" _textText: "B"
} }
Bouton {
id: bouton
x: 76
y: 47
_textText: "Générer un mot"
}
Keys.onPressed: (event) => { Keys.onPressed: (event) => {
if (event.key === Qt.Key_A) { if (event.key === Qt.Key_A) {
case1._textText = qsTr("C"); // Correcte modification case1._textText = qsTr("C"); // Correcte modification
......
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>Case.qml</file> <file>Case.qml</file>
<file>Bouton.qml</file>
</qresource> </qresource>
</RCC> </RCC>
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment