In my own TextEdit (inherits QTextEdit
) I implement this DragEventHandler:
void CustomTextEdit::dragEnterEvent(QDragEnterEvent* e)
{
qDebug() << "void CustomTextEdit::dragEnterEvent(QDragEnterEvent* e)";
qDebug() << "e->mimeData()->hasText() is" << e->mimeData()->hasText();
QTextEdit::dragEnterEvent(e);
}
Example: When I select text inside the TextEdit and drag it around,
the handler gets called and hasText()
is true
.
When I drag an item from a QListWidget
into the TextEdit the handler also gets called
but hasText()
is false
. How can I handle the DropEvent anyway?
(QDragEnterEvent
basically IS a QDropEvent
)
I know that this would be done in the DropHandler but my question is
what information does the DropEvent coming from QListWidget
contain?
How can access this information?