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. Drag and drop case (Tree to Table)
Forum Updated to NodeBB v4.3 + New Features

Drag and drop case (Tree to Table)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 372 Views 2 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.
  • _ Offline
    _ Offline
    __vnv__
    wrote on last edited by
    #1

    Hello everyone,

    I am trying to do following, on my left side there is a treewidget and on my right there is a tableview with custom model. I would like to take item from treewidget (grab) and move onto tableview and item should be added on the end of the list.
    I am not interested in data located in treewidget (captions) but ID that is connected to the item itself.
    I had idea to go around and do the following:

    1. Detect when item is selected in treewidget and then mouse clicked is pressed.
    2. Detect if mouse is released on tableview (and if item was selected) do the action of adding new data to the table

    Issue is that there is no mouseRelease signal for tableview and to be honest this doesn't seem the right way to do it.
    Could someone please explain the right steps to achieve this.

    Thank you for helping out a newb!

    raven-worxR 1 Reply Last reply
    0
    • _ __vnv__

      Hello everyone,

      I am trying to do following, on my left side there is a treewidget and on my right there is a tableview with custom model. I would like to take item from treewidget (grab) and move onto tableview and item should be added on the end of the list.
      I am not interested in data located in treewidget (captions) but ID that is connected to the item itself.
      I had idea to go around and do the following:

      1. Detect when item is selected in treewidget and then mouse clicked is pressed.
      2. Detect if mouse is released on tableview (and if item was selected) do the action of adding new data to the table

      Issue is that there is no mouseRelease signal for tableview and to be honest this doesn't seem the right way to do it.
      Could someone please explain the right steps to achieve this.

      Thank you for helping out a newb!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @__vnv__
      you should read this and this.
      You can easily add custom data (e.g. your desired ID) to the drag and check it in the target drop

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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