Skip to content
Snippets Groups Projects
Select Git revision
  • 83119e9a7b6766e9a90bedd2a306ee5a0e678ab3
  • master default protected
2 results

Main.qml

Blame
  • user avatar
    Ulysse Durand authored
    83119e9a
    History
    Main.qml 1.04 KiB
    import QtQuick
    
    Window {
        width: 900
        height: 800
        visible: true
        color: "#8ff0a4"
        title: qsTr("Hello World")
    
        Rectangle {
            id: rectangle
            x: 286
            y: 86
            width: 328
            height: 58
            color: "#26a269"
    
            Text {
                id: _text
                x: 121
                y: 12
                color: "#f1e6e6"
                text: qsTr("Motus")
                font.pixelSize: 30
            }
        }
    
        MenuDeroulant {
            id: menuDeroulant
            x: 38
            y: 301
            rectangleColor: "#b33939"
        }
    
        Bouton {
            id: bouton
            x: 360
            y: 624
            mouseArea.onClicked: {
                pageLoader.source = "GameWindow.qml";
                jeu.startGame();
            }
        }
    
        Loader {
            id: pageLoader
            anchors.centerIn: parent
    
            // Once the page is loaded, notify C++
            onItemChanged: {
                if (item) {
                    // Call a function in C++ and pass the root item of GameWindow
                    jeu.setGameWindowItem(item);
                }
            }
        }
    }