Make a tree in Qml with Menu
Unsolved
QML and Qt Quick
-
Hello everybody,
I try to make a dynamic tree at 3 level with the component Menu ( I did not find better), but It does not work
this is my code :Button { id: fileButton text: "File" onClicked: menu.open() //Component.onCompleted: menu.open() ListView{ model : ["1", "2", "3"] delegate : Button{ id : menu text : modelData onClicked: menu2.open() Menu{ y: fileButton.height id : menu2 ListView{ model : ["a", "b", "c"] delegate : Button{ y: menu.height id : menu3 text : modelData } } } } }//end listView }
I am working on Qt 5.9
do you have an idea to resolve my problem ?
thanks