Reputation: 5002
I have the class codeEditor that inherits QPlainTextEdit. I have reimplemented the dragEnterEvent like this:
void CodeEditor::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/uri-list") || event->mimeData()->hasFormat("text/plain"))
event->acceptProposedAction();
}
And it works for text/plain mime types but for text/uri-list like dragging a file into it. It changes the cursor to indicate it's invalid and if I drop a file it does not work.
Another strange thing it works great in linux. How can I fix this?
Upvotes: 0
Views: 225
Reputation: 8197
Somebody already reported it as bug with qt
I am not sure if its been fixed yet.
Please check, it may be useful. :)
Upvotes: 2