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. Binding value to component
Forum Updated to NodeBB v4.3 + New Features

Binding value to component

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 608 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    Babalas
    wrote on last edited by
    #1

    I've got a setting in my main qml file that I want to pass to a custom settings component to modify. So in main I have this:
    @Atmosphere { hr: 8 ... }@

    And at the moment my setting is:
    @Setting {
    minimumValue: 1.0
    maximumValue: 12.0
    text: "Hr"
    setting: atmosphere.hr
    onSettingChanged: atmosphere.hr = setting
    }@

    Where "setting" is a property variant in my Setting component that ultimately gets connected to the value of a slider. Within a component I can use alias. Is there something equivalent externally to a component? I.e. can I pass atmosphere.hr to Setting as a reference value that Setting can update directly rather than going through the onSettingChanged signal?

    Thanks

    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