I'm developing simple HTML editor and I like to be able to drag and drop from a button that for example represent HTML text line and in the Qwebkit
the HTML text line will be created does Qt
support such action?
How should I approach such thing?
I believe it does, yes.
What you need to do is set the mime type of your drag event. See here for details. Then on the webkit side, you can read the drops mime type to see what it was.
You can then try one of the following approaches:
QWebView
to implement dragEnterEvent
and dropEvent
. You can use event->pos()
in the dropEvent
to get the position where the drop occured.