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. Button that change color when another button pressed

Button that change color when another button pressed

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

    I have a button and an array of buttons, how can I, when I click on the button, wait until the button from the array is clicked, paint it a color, which my array button has?

    1 Reply Last reply
    0
    • len1n8919L Offline
      len1n8919L Offline
      len1n8919
      wrote on last edited by
      #2

      property string currentColor
      ...
      Button {
      id: button1
      color: currentColor
      }
      ...
      Button {
      id: button2
      onClicked: currentColor = button2.color
      }

      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