问题
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.
来源:https://stackoverflow.com/questions/35349138/how-to-draw-line-between-folded-blocks-in-qplaintextedit