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. [Solved] event.accepted stops JavaScript from processing the next line
Forum Updated to NodeBB v4.3 + New Features

[Solved] event.accepted stops JavaScript from processing the next line

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 1 Posters 2.5k 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.
  • B Offline
    B Offline
    bundickt
    wrote on last edited by
    #1

    I'm using the Keys.onPressed signal to process different key events. I read that once an event is processed you should set the event.accepted to true. When I do that nothing after that line of JavaScript gets processed. I even tried just logging the value of event.accepted and a similar thing happened. It printed out the value stored in event.accepted but stopped processing the JavaScript. I'm not sure if this is what is suppose to happen or if there is another way to stop the event from propagating. Please let me know if this is a bug or If i'm doing something wrong.

    Thanks,
    Tom

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bundickt
      wrote on last edited by
      #2

      Please delete this... it turned out to be a bug in my code that made it look like event.accepted wasn't working properly.

      Thanks,
      Tom

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        It happens sometimes and its ok. We just tag it as solved :)

        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