Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    OnClicked issues

    QML and Qt Quick
    2
    2
    979
    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.
    • D
      dstudentx last edited by

      can you have onClicked do 2 operations?

      such as

      @ MouseArea {
      id: mousearea11
      x: 56
      y: 51
      width: 118
      height: 110
      anchors.rightMargin: 502
      anchors.bottomMargin: 286
      anchors.leftMargin: 56
      anchors.topMargin: 51
      anchors.fill: parent
      onClicked: mainLoader.source = "load_images.qml"
      onClicked: page.state = 'State1'
      }@

      1 Reply Last reply Reply Quote 0
      • M
        melghawi last edited by

        Yes you can.

        @
        MouseArea {
        id: mousearea11
        x: 56
        y: 51
        width: 118
        height: 110
        anchors { fill:parent; rightMargin: 502; bottomMargin: 286; leftMargin: 56; topMargin: 51 }

            onClicked: {
                    mainLoader.source = "load_images.qml";
                    page.state = 'State1';
            }
        

        }
        @

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