Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Drag and Drop from 2 Listwidgets, but change text after dropping in 2nd Listwidget
The 'Country' QListwidget is going to be populated with country names items and if the user drags that an item and drops it in capital QListWidget, it should show me the name of its capital , i.e that item text should change in capital QListWidget.
for example - an item named "Russia" in country listwidget , after dragging and dropping , the item should be renamed to "Moscow".
so far to enable drag and drop, i have just written this code,
is this possible in QT?
There might be several ways. One of which is to subclass and re-implement the dropMimeData method to replace the country by its capital.
@SGaist , Oh okay, thanks, this narrows down my search, but what code logic can i put in drop mime data method,
can you provide code segment.
@learnist Solved using item delegate , Thanks for the input
Good then please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found.