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. Big Problem Dropping
Qt 6.11 is out! See what's new in the release blog

Big Problem Dropping

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 784 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.
  • Q Offline
    Q Offline
    Qtarth
    wrote on last edited by
    #1

    Hi, I have been looking how to do this but after all I still don't understand how it's working. I want to change the default behaviour when you drop into QTableWidget; when you do drop new items they are added as a new ROW in the QTableWidget by default but I need they to be added as new COLUM instead.

    If someone could help me to manage this drop event would be great...

    Thanks.

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

      Hi and welcome to devnet,

      Have a look at the "Drag and Drop" chapter of Qt's documentation. It will give you the basics to start.

      Hope it helps

      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
      • Q Offline
        Q Offline
        Qtarth
        wrote on last edited by
        #3

        Ok, finally I got how to manage a drop event overwriting the functions "dragEnterEvent(QDragEnterEvent *event)" and "dropEvent(QDropEvent *event)".

        But now I am having problems retrieving mimeData() from QTreeWidget... Seems that this data is not (text event->mimeData()-text()), and I would like to get this data but not in binary.

        Some idea? will I have to create a personalized QTreeWidget class to do this? overwriting the drop event?

        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