Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Using aliases of modelfunctions

    QML and Qt Quick
    qml alias property model
    1
    1
    619
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      louis last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post