[PyQt] QTextEdit based interpreter how to paste multiple lines of string?

Han Jiang oglops at gmail.com
Tue Jan 19 07:54:58 GMT 2016


I have a embeded python interpreter which is qtextedit, I want it to have
the same behavior as  external python interpreter.

default interpreter:  http://imgur.com/sq7IeUH
my pyqt interpreter:  http://imgur.com/dM6Cian

there are several problems:
1.How do I make the text cursor stay at the line I was editing on, and not
follow my drag selection?  ( with QTextBlock userstate ? )

2.How can I made not editing lines read only, but the lines I am editing
editable? ( with QTextBlock userstate?)

3. How do I add ... to the beginning of lines if I paste multiple lines of
code inside? ( with eventfilter?)

the code is here :   https://github.com/oglops/pyshell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160118/94d64ed2/attachment.html>


More information about the PyQt mailing list