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 property alias to changes property values in separate qml files
Forum Updated to NodeBB v4.3 + New Features

Using property alias to changes property values in separate qml files

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 476 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.
  • C Offline
    C Offline
    CaptainJuice
    wrote on last edited by CaptainJuice
    #1

    Hey guys! I'm trying to change the value of a property I created in in "main.qml" from a different qml file "other.qml".
    ///////////////////////////////////
    main.qml
    ///////////////////////////////////

    ApplicationWindow {
    
    
    
        property alias mapFlags: window.mapFlag
        property alias trailFlags: window.trailFlag
        property alias logFlags: window.logFlag
        id: window
            width: 640
            height: 480
            visible: true
            title: qsTr("Stack")
            property bool trailFlag: false
            property bool mapFlag: true
            property bool logFlag: false
    

    ///////////////////////////////////
    other.qml
    ///////////////////////////////////

             onTrailClicked:
                {
                    logFLags:false
                    mapFLags:false
                    trailFLags:true
    

    Any help would be awesome, i tried to make this is as neat as possible while including all relevant info. I don't get any errors the flags just don't get set.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flowery
      wrote on last edited by
      #2

      Do Assignation:
      logFLags = false
      mapFLags = false
      trailFLags= true
      Property binding wont work.

      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