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. QTableView internal drag&drop: Disallow drop on other items
Forum Updated to NodeBB v4.3 + New Features

QTableView internal drag&drop: Disallow drop on other items

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

    Hi, I'm currently implementing an internal drag&drop feature for a QTableView and it seems to work fine out of the box like this:

    table->setDragEnabled(true);
    table->setDragDropMode(QAbstractItemView::InternalMove);
    table->setDragDropOverwriteMode(false);
    

    No drag&drop specific changes have been made to the model. The only issue is that this feature allows drops on other items, which produces unspecified behavior in my case. I only want to allow drops above or below other items. The OnItem drop indicator shouldn't even appear, only AboveItem & BelowItem.
    Where do I need to handle this?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What happens with your model ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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