Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26349

MouseArea.pressed is a boolean property instead of function

    XMLWordPrintable

Details

    Description

      Take a look at the following code:

      Item {
          signal clicked()
          signal pressed()
          MouseArea {
              id: mouse
          }
          Component.onCompleted: {
              console.log(typeof(mouse.clicked)) // OK - function
              mouse.clicked.connect(clicked) // OK
              console.log(typeof(mouse.pressed)) // NOT OK - boolean
              mouse.pressed.connect(pressed) // NOT OK - TypeError: Result of expression 'mouse.pressed.connect' [undefined] is not a function.
          }
      }
      

      The event cannot be used as a signal to be connected

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              martjone Martin Jones (closed Nokia identity) (Inactive)
              itehnological Itehnological
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes