Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using aliases of modelfunctions

Using aliases of modelfunctions

Scheduled Pinned Locked Moved QML and Qt Quick
qmlaliaspropertymodel
1 Posts 1 Posters 836 Views
  • 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 Offline
    L Offline
    louis
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved