N
N
Nikita Mironov2015-11-05 17:17:42
Qt
Nikita Mironov, 2015-11-05 17:17:42

How to implement Drag-and-drop in QPlainTextEdit?

Good afternoon! I would like to know if it is possible (if possible, with what and how) to implement Drag-and-drop text in QPlainTextEdit.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Lyashkevich, 2015-11-07
@ctin

Of course it is possible.
Everything is detailed here:
doc.qt.io/qt-5/dnd.html
In short, catch QMimeData and check the hasText and hasHTML methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question