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. Parent-child
Forum Updated to NodeBB v4.3 + New Features

Parent-child

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 250 Views 2 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.
  • Q Offline
    Q Offline
    qcoderpro
    wrote on last edited by
    #1

    Isn't parent stated on line 81 of this link the rectangle on line 58?

    mzimmersM 1 Reply Last reply
    0
    • Q qcoderpro

      Isn't parent stated on line 81 of this link the rectangle on line 58?

      mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by mzimmers
      #2

      @qcoderpro I'm including a snippet of the code you referenced:

      Rectangle {
      property int count: 9 
          ...
          MouseArea {
              anchors.fill: parent
      
              onClicked: {
                  theModel.append({"number": ++parent.count})
              }
          }
      }
      

      If you're asking if the parent of the MouseArea is the Rectangle, I believe the answer is "yes." I'm curious -- why do you ask?

      Q 1 Reply Last reply
      1
      • mzimmersM mzimmers

        @qcoderpro I'm including a snippet of the code you referenced:

        Rectangle {
        property int count: 9 
            ...
            MouseArea {
                anchors.fill: parent
        
                onClicked: {
                    theModel.append({"number": ++parent.count})
                }
            }
        }
        

        If you're asking if the parent of the MouseArea is the Rectangle, I believe the answer is "yes." I'm curious -- why do you ask?

        Q Offline
        Q Offline
        qcoderpro
        wrote on last edited by qcoderpro
        #3

        @mzimmers

        Right, 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