mardi 21 avril 2015

StackView in ui.qml Forms

well, my question is very simple, i want to use the ui.qml files but i cant use Component and Loader insite these files, so for that reason i cant use StackView because for config the StackView i need use Component and loaders, so my question is, how i assign a Component and Loaders in main.qml of a StackView inside of WinForm.ui.qml? i alrady try this in MainForm.ui.qml file:

property alias stackV: stackV
...
StackView{
        id: stackV
    }
...

in main.qml file:

MainForm {
    anchors.fill: parent
    stackV{
        Component{
            id: comp1
            Loader {
                id:loader1
                source: "VentPrinc.qml"
            }
        }
    }
}

but i get this error

QQmlApplicationEngine failed to load component qrc:/main.qml:30 Cannot assign a value directly to a grouped property

i really appreciate any help

Aucun commentaire:

Enregistrer un commentaire