Skip to content
Snippets Groups Projects
Commit 2c0f8f3c authored by Massies Alexandre's avatar Massies Alexandre
Browse files
parents fac97e7c bfa12a66
Branches
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,8 +19,7 @@ qt_add_qml_module(appMotus ...@@ -19,8 +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
RESOURCES .gitignore QML_FILES Bouton.qml
QML_FILES Key.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
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
<qresource prefix="/"> <qresource prefix="/">
<file>Case.qml</file> <file>Case.qml</file>
<file>Key.qml</file> <file>Key.qml</file>
<file>Bouton.qml</file>
</qresource> </qresource>
</RCC> </RCC>
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment