如何在QPlainTextEdit中的折叠块之间画线?

时间:2016-02-11 20:11:52

标签: qt pyqt pyside code-folding

我很挣扎,我甚至不知道在QPlainTextEdit中是否可能。 不知道如何在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_())

....现在两个街区被折叠,但无法在两个可见之间画线。我将不胜感激任何帮助。感谢。

0 个答案:

没有答案