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 Updated to NodeBB v4.3 + New Features

QTableView Drag'n'Drop Cell Indicator

Scheduled Pinned Locked Moved General and Desktop
qtableviewdrag and dropdraggingcellindicatorselection
2 Posts 2 Posters 2.0k 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.
  • B Offline
    B Offline
    Ben35
    wrote on 10 Aug 2015, 17:27 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
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 11 Aug 2015, 17:34 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

      1/2

      10 Aug 2015, 17:27

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved