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

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 5 Feb 2020, 06:32 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 1 Reply Last reply 5 Feb 2020, 06:36
    0
    • I imhs
      5 Feb 2020, 06:32

      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 Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 5 Feb 2020, 06:36 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 5 Feb 2020, 07:36
      1
      • J J.Hilk
        5 Feb 2020, 06:36

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

        I Offline
        I Offline
        imhs
        wrote on 5 Feb 2020, 07:36 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 J 2 Replies Last reply 5 Feb 2020, 07:38
        0
        • I imhs
          5 Feb 2020, 07:36

          @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 Offline
          J Offline
          J.Hilk
          Moderators
          wrote on 5 Feb 2020, 07:38 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 5 Feb 2020, 08:01
          2
          • I imhs
            5 Feb 2020, 07:36

            @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 Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 5 Feb 2020, 07:38 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 5 Feb 2020, 08:02
            1
            • J J.Hilk
              5 Feb 2020, 07:38

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

              I Offline
              I Offline
              imhs
              wrote on 5 Feb 2020, 08:01 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
              • J jsulm
                5 Feb 2020, 07:38

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

                I Offline
                I Offline
                imhs
                wrote on 5 Feb 2020, 08:02 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

                7/7

                5 Feb 2020, 08:02

                • Login

                • Login or register to search.
                7 out of 7
                • First post
                  7/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved