Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to implement a simple widget that like QT Designer?
Hi, I want to make an application that is used to simulate certain things. I need a window similar to qtdesigner, but much simplified. There is a list on the left side of this widget, and you can drag something from this list to the right window. But I don't know how to implement it, I have no idea. Hope to give me some hints, or tell me where there are some simple examples.
thanks for your help.
In QtWidgets you should probably use QGraphicsView framework:
Your list widget/model could then provide custom mime-type data which is interpreted by the graphics view on a drop event and creates the simple items in the graphics view.
@jsulm yes, i am reading it. thanks
@raven-worx hi, I want to ask, which class do you suggest my list widget should use？
QListView with a custom QAbstractListModel i guess.
also read this: https://doc.qt.io/qt-5/model-view-programming.html#using-drag-and-drop-with-item-views
to make your model provide custom drag data