Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Problem with assigning the focus property

    QML and Qt Quick
    2
    3
    126
    Loading More Posts
    • 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.
    • A
      Anita last edited by

      Hi,
      @J-Hilk @raven-worx @dheerendra

      I am assigning the focus for an item in a qml, by setting the focus property to true, but I am not getting any key events for that item. If I do a forceActivefocus on that item, only then the item is emitting the key events. Why doesnt the item give any key events when the focus property is set to true?

      J.Hilk 1 Reply Last reply Reply Quote 0
      • J.Hilk
        J.Hilk Moderators @Anita last edited by

        @anita if you simply write focus:true then that means, this item will have the focus, within the enclosing focusScope.

        Active focus is for example, gained by calling forceActivefocus 😉

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

        Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


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

        1 Reply Last reply Reply Quote 3
        • A
          Anita last edited by

          @J-Hilk
          Thank You for the answer.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post