Big Problem Dropping



  • 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.


  • Lifetime Qt Champion

    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



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.