No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

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

    Click and double-click event handling for QTree

    Framework
    2
    3
    806
    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.
    • T
      tdumitr last edited by

      I need help with a couple of things related to QTree.

      The first has to do with the click behavior of the tree. Assuming one clicks only on one specific node, the first click selects it, the second click deselects it. I need a different kind of behavior: 1st click selects it, and the second and subsequent clicks are ignored (the node stays selected). The only way the selection changes is if the user clicks on some other node. How can I simulate this behavior?

      The second issue I have is detecting double-clicks. I know that Vue, in general, has an issue with not emitting any double-click event, but one can simulate them using a timer and the click event. However, the QTree does not issue the click event, so that is not possible. So, how do I handle a double-click on a tree node?

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        You might be better off using QList or QMenu, if “clicking” is your goal. 😄

        Scott

        1 Reply Last reply Reply Quote 0
        • T
          tdumitr last edited by

          Scott,

          You’re right, given the way the QTree behaves, I might need to build my own with QList and QExpansionItem.

          Tibi.

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