Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using aliases of modelfunctions



  • Hello,
    to improve readability, i want to set a alias for a function of a model.

    this is not possible because alsiases are generated once before the component is completed and i give the model dynamically when it is generated.

    //SomePage
    FocusScope
    {
    id: root
    property variant model: null

    property alias modeZero: model.isMode(0) //something like this
    }
    is there a Workaround or another use like the #DEFINE modeZero model.isMode(0) directive in C that just replaces the string "modeZero" in the Code with the model.isMode(0) before compiling?

    regards