From d9a7a651a7bbc980bbb2e63c5ce730c6e0e26776 Mon Sep 17 00:00:00 2001
From: ppouchet <pierre.pouchet@etu.ec-lyon.fr>
Date: Sat, 22 Mar 2025 11:20:44 +0100
Subject: [PATCH] =?UTF-8?q?arrangements,=20ne=20marche=20quand=20m=C3=AAme?=
 =?UTF-8?q?=20pas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Motus/BackKey.qml     |  2 +-
 Motus/CMakeLists.txt  |  1 -
 Motus/Main.qml        | 12 +++++++++++-
 Motus/Ressources.qrc  |  1 +
 Motus/wordchooser.cpp |  2 +-
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/Motus/BackKey.qml b/Motus/BackKey.qml
index 3330689..3ee2759 100644
--- a/Motus/BackKey.qml
+++ b/Motus/BackKey.qml
@@ -17,7 +17,7 @@ Item {
         width: 100
         height: 30
         anchors.verticalCenter: parent.verticalCenter
-        source: "qrc:/qtquickplugin/images/template_image.png"
+        source: "qrc:/back_key.png"
         anchors.horizontalCenter: parent.horizontalCenter
         fillMode: Image.PreserveAspectFit
     }
diff --git a/Motus/CMakeLists.txt b/Motus/CMakeLists.txt
index 12c3cd0..e9ddbc6 100644
--- a/Motus/CMakeLists.txt
+++ b/Motus/CMakeLists.txt
@@ -19,7 +19,6 @@ qt_add_qml_module(appMotus
         Main.qml
         RESOURCES Ressources.qrc
         QML_FILES Case.qml
-        QML_FILES Case.qml
         QML_FILES Key.qml
         QML_FILES BackKey.qml
         QML_FILES Bouton.qml
diff --git a/Motus/Main.qml b/Motus/Main.qml
index 563a7fa..ac3f942 100644
--- a/Motus/Main.qml
+++ b/Motus/Main.qml
@@ -57,6 +57,16 @@ Window {
             }
         }
 
+
+        Image {
+            id: testImage
+            source: "qrc:/back_key.png"
+            width: 100
+            height: 100
+            anchors.left: parent.left
+            anchors.top: parent.top
+        }
+
         Rectangle {
             id: rectangle1
             y: 666
@@ -374,7 +384,7 @@ Window {
                         width: 100
                         height: 60
                         anchors.verticalCenter: parent.verticalCenter
-                        imageSource: "qrc:/Ressources/back_key.png"
+                        imageSource: "qrc:/back_key.png"
                     }
                 }
             }
diff --git a/Motus/Ressources.qrc b/Motus/Ressources.qrc
index c5a7ac9..6c7eb07 100644
--- a/Motus/Ressources.qrc
+++ b/Motus/Ressources.qrc
@@ -5,5 +5,6 @@
         <file>Case.qml</file>
         <file>Key.qml</file>
         <file>words_alpha.txt</file>
+        <file>back_key.png</file>
     </qresource>
 </RCC>
diff --git a/Motus/wordchooser.cpp b/Motus/wordchooser.cpp
index 0f48767..fe0abe6 100644
--- a/Motus/wordchooser.cpp
+++ b/Motus/wordchooser.cpp
@@ -9,7 +9,7 @@ WordChooser::WordChooser(QObject *parent) : QObject(parent) {
 }
 
 void WordChooser::loadWords() {
-    QFile file(":/words_alpha.txt"); // adapte le chemin si besoin
+    QFile file("qrc:/words_alpha.txt");
     if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
         QTextStream in(&file);
         while (!in.atEnd()) {
-- 
GitLab