N
N
Nonprogrammer2015-12-12 22:01:20
Python
Nonprogrammer, 2015-12-12 22:01:20

How to get the text selected by the user from QTextEdit?

I have PyQt4
In QTextEdit the text is displayed and the user will select the desired characters (words). I need to get these characters. You do not need to get all the content, only the one selected by the User.
Read in QTextEdit you can copy the selected text to the clipboard. But how do I get the text from the buffer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AtomKrieg, 2015-12-12
@c_pro_lang

QTextEdit::copy
QClipboard::text

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question