I have a QDeclarativeView to display my QML. I want to implement an interaction with my existing widgets, mainly to drag an item from a QTreeView and drop it onto the QDeclarativeView - I want to catch just the drop action and then based on the mime data decide what to do in my QML.
Currently I tried to setAcceptDrops(true) on my QDeclarativeView but still, when I try to drag an item on top of it I have the mouse cursor saying no drop is allowed.
I couldn't find an example for this online. Can anyone help out?
Qt Code:
// header QDeclarativeView *mView; QDeclarativeEngine *mEngine; QDeclarativeContext *mContext; // cpp mView = new QDeclarativeView(this); mEngine = mView->engine(); mContext = mEngine->rootContext(); mView->setAcceptDrops(true);To copy to clipboard, switch view to plain text mode
Bookmarks