Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Keys is only available via attached properties
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Keys is only available via attached properties

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k 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.
  • I Offline
    I Offline
    ivanchuk
    wrote on last edited by
    #1

    I have the following error when trying to run my application with Keys {} in a QML file

    "Keys is only available via attached properties"

    What can I do to use keyboard keys?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      t3685
      wrote on last edited by
      #2

      Have a look at this:

      "Keys documentation":http://qt-project.org/doc/qt-5/qml-qtquick-keys.html#example-usage

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ivanchuk
        wrote on last edited by
        #3

        Yes, I know. But the problem was I was using Keys like this

        Keys {}

        and must be used like this

        Keys.on... {}

        Thanks

        1 Reply Last reply
        1

        • Login

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