How to draw line between folded blocks in QPlainTe

2019-09-02 14:48发布

I have a struggle and I even don't know is it possible in QPlainTextEdit. Have no idea how to draw a line between to folded blocks in QPlainTextEdit :

import sys
from PySide.QtCore import *
from PySide.QtGui import *

app = QApplication(sys.argv)

textEdit = QPlainTextEdit()
textEdit.setViewportMargins( 50,0,0,0 )

textEdit.setPlainText( 
'''There is a house in New Orleans
They call the Rising Sun
And it's been the ruin of many a poor boy
And God, I know I'm one'
''')

for n in [1,2] :
    textEdit.document().findBlockByNumber(n).setVisible( False )

textEdit.setGeometry( 600, 600, 400, 250 )
textEdit.show()
sys.exit(app.exec_())

....now two blocks are folded, but can't draw the line between two visible. I would appreciate any help. Thanks.

0条回答
登录 后发表回答