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. switch button problem! qml
QtWS25 Last Chance

switch button problem! qml

Scheduled Pinned Locked Moved Solved QML and Qt Quick
touchscreenlockqml
7 Posts 3 Posters 1.4k 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.
  • I Offline
    I Offline
    imhs
    wrote on last edited by
    #1

    Hello
    I have some switches in my program and I want to disable them using a lock button. when I toggle on the lock switch button the property "checkable" is set to false.
    When I toggle on the lock button and touch the switches in won't be toggled. However, if I drag them while the lock switch is still true they will toggle!
    I don't know what is the problem! is there any other property that can disable the switch?
    regards

    J.HilkJ 1 Reply Last reply
    0
    • I imhs

      Hello
      I have some switches in my program and I want to disable them using a lock button. when I toggle on the lock switch button the property "checkable" is set to false.
      When I toggle on the lock button and touch the switches in won't be toggled. However, if I drag them while the lock switch is still true they will toggle!
      I don't know what is the problem! is there any other property that can disable the switch?
      regards

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi @imhs
      you could set the enabled property to false 😉


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      I 1 Reply Last reply
      1
      • J.HilkJ J.Hilk

        hi @imhs
        you could set the enabled property to false 😉

        I Offline
        I Offline
        imhs
        wrote on last edited by
        #3

        @J-Hilk Thanks a lot. It works. But why this property is not listed in the help?
        https://doc.qt.io/qt-5/qml-qtquick-controls2-switch-members.html

        J.HilkJ jsulmJ 2 Replies Last reply
        0
        • I imhs

          @J-Hilk Thanks a lot. It works. But why this property is not listed in the help?
          https://doc.qt.io/qt-5/qml-qtquick-controls2-switch-members.html

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @imhs it is, check the The following members are inherited from Item. section


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          I 1 Reply Last reply
          2
          • I imhs

            @J-Hilk Thanks a lot. It works. But why this property is not listed in the help?
            https://doc.qt.io/qt-5/qml-qtquick-controls2-switch-members.html

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @imhs It is, see "The following members are inherited from Item." section in the link you posted.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            I 1 Reply Last reply
            1
            • J.HilkJ J.Hilk

              @imhs it is, check the The following members are inherited from Item. section

              I Offline
              I Offline
              imhs
              wrote on last edited by
              #6

              @J-Hilk said in switch button problem! qml:

              @imhs it is, check the The following members are inherited from Item. section

              Thanks for your help. I saw it.

              1 Reply Last reply
              1
              • jsulmJ jsulm

                @imhs It is, see "The following members are inherited from Item." section in the link you posted.

                I Offline
                I Offline
                imhs
                wrote on last edited by
                #7

                @jsulm said in switch button problem! qml:

                @imhs It is, see "The following members are inherited from Item." section in the link you posted.

                Thanks for your help. I saw it.

                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