Drag and Drop
-
He estado leyendo sobre Drag and Drop y ando un poco perdido para implementarlo, tengo un QListWidget y quiero pasar el texto de cada item que arrastre a un determinado QLabel, he visto ejemplos pero no me queda claro, mis preguntas, debo hacer una clase que herede de un QLabel y de un QListWidget para poder arrastrar y soltar entre ellos? cuales son los eventos que debo implementar? Espero puedan darme un ejemplo que aplique como para lo que quiero hacer, no les pido que me lo resuelvan sino que me guíen o me den algo que leer, muchas gracias!
-
My Spanish is a bit rusty, but if I understand you correctly, then you want to do drag and drop between a QLabel and a QListWidget? If so, perhaps the following "FAQ":http://developer.qt.nokia.com/faq/answer/how_can_i_drag_items_between_a_qtoolbar_and_a_qlistwidget can be of help. It shows how to drag and drop between a QToolBar and a QListWidget, and should be easy to tweak to be between a QListWidget and a QLabel instead.
-
[quote author="sigrid" date="1306235236"]My Spanish is a bit rusty, but if I understand you correctly, then you want to do drag and drop between a QLabel and a QListWidget? If so, perhaps the following "FAQ":http://developer.qt.nokia.com/faq/answer/how_can_i_drag_items_between_a_qtoolbar_and_a_qlistwidget can be of help. It shows how to drag and drop between a QToolBar and a QListWidget, and should be easy to tweak to be between a QListWidget and a QLabel instead. [/quote]
My english is a bit rusty too and I can't find all the words to express how grateful I am, it works exactly like I expected, I would buy you a cake if I could. :)