Skip to content
Snippets Groups Projects
Commit dddb3ba8 authored by Yanis Dziki's avatar Yanis Dziki
Browse files

Ajout menu

parent 75bfd6d2
No related branches found
No related tags found
No related merge requests found
...@@ -4,12 +4,33 @@ Window { ...@@ -4,12 +4,33 @@ Window {
width: 900 width: 900
height: 800 height: 800
visible: true visible: true
color: "#8ff0a4"
title: qsTr("Hello World") 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 { MenuDeroulant {
id: menuDeroulant id: menuDeroulant
x: 38 x: 38
y: 301 y: 301
rectangleColor: "#b33939"
} }
Bouton { Bouton {
...@@ -26,4 +47,5 @@ Window { ...@@ -26,4 +47,5 @@ Window {
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
...@@ -5,7 +5,8 @@ Item { ...@@ -5,7 +5,8 @@ Item {
id: _item id: _item
property alias _textText: _text.text property alias _textText: _text.text
width: 400 width: 400
height: expanded ? 250 : 50 // Ajuste la hauteur dynamiquement height: 25
property alias rectangleColor: rectangle.color // Ajuste la hauteur dynamiquement
property bool expanded: false // Gère l'affichage des options property bool expanded: false // Gère l'affichage des options
ListModel { ListModel {
...@@ -15,7 +16,7 @@ Item { ...@@ -15,7 +16,7 @@ Item {
Rectangle { Rectangle {
id: rectangle id: rectangle
width: 400 width: 400
height: 50 height: 25
color: "#ffffff" color: "#ffffff"
Text { Text {
...@@ -29,8 +30,10 @@ Item { ...@@ -29,8 +30,10 @@ Item {
Image { Image {
id: image id: image
x: 331
y: 0
width: 69 width: 69
height: 50 height: 92
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 0 anchors.rightMargin: 0
source: "qrc:/qtquickplugin/images/template_image.png" source: "qrc:/qtquickplugin/images/template_image.png"
...@@ -38,6 +41,7 @@ Item { ...@@ -38,6 +41,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
anchors.bottomMargin: 25
onClicked: { onClicked: {
expanded = !expanded // Basculer l'affichage expanded = !expanded // Basculer l'affichage
console.log("Click sur image") console.log("Click sur image")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment