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. QTreeWidget/QTreeWiew drag & drop

QTreeWidget/QTreeWiew drag & drop

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.4k 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.
  • A Offline
    A Offline
    AlricDoRei
    wrote on last edited by
    #1

    Hello. I am working with my project and got I problem.
    When I use drag and drop from QTreeWidget/QTreeView there is an item with the mouse cursor.
    Is there any way to remove this item block?
    !http://i50.tinypic.com/2mnj2tx.png()!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      It is actually the "QDrag::pixmap()":http://doc.qt.nokia.com/4.7-snapshot/qdrag.html#pixmap . You can change the pixmap using "QDrag::setPixmap":http://doc.qt.nokia.com/4.7-snapshot/qdrag.html#setPixmap

      You can write something like

      @QDrag *drag = new QDrag(this);
      drag->setMimeData(/mimeData/);
      drag->setHotSpot(/location/);
      drag->setPixmap(/pixmap/));@

      in startDrag() event or mousePressEvent() whichever you are using.

      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