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 Drag'n'Drop Cell Indicator
Forum Update on Monday, May 27th 2025

QTableView Drag'n'Drop Cell Indicator

Scheduled Pinned Locked Moved General and Desktop
qtableviewdrag and dropdraggingcellindicatorselection
2 Posts 2 Posters 2.0k Views
  • 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
    Ben35
    wrote on last edited by
    #1

    Hello,

    I need some help with the drag and drop in QTableViews !

    I have two QTableView with customs QAbstractTableModel in which i implemented methods to deal with DnD (mimeData(), dropMimeData(), flgs(), etc.). When i drag a row or a cell from a table to the other, the drop indicator tells me if my drop is valid or not. I would like to know if it's possible to have an indicator different for each cell during the drop that depends of the mimeData of the selected dragging cell ?

    Thanks a lot !

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

      Hi and welcome

      Maybe
      void QDrag::setPixmap(const QPixmap & pixmap)
      Could be used ?
      You set it when you start the drag so it sounds it might do what you want.

      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