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. Condition for two buttons interaction

Condition for two buttons interaction

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

    I'm developing an app for a robot for restaurants. The robot has three trays and knows the table numbers. On the screen, the user will need to select a tray (each tray is a button), then select the table number(array of buttons) and save in memory which table the tray corresponds to.
    That is, if the tray button is pressed, then the table buttons become active and you need to pick 1 table and in text format the screen displays which table has which tray.
    So, I don't know how to make it in code, I have a problem with checking if tray button is pressed

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you looking for the pressed property ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you looking for the pressed property ?

        D Offline
        D Offline
        denn1sbeat
        wrote on last edited by
        #3

        @SGaist Not at all, I need to write a number of the table in my tray button
        I tried to use this code, but it is not working:

        if(trayButton.pressed) {
            if(tableButton.pressed) {
                 trayText = tableText
            }  
        }
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Wouldn't a RadioButton be more fitting ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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