0

我有一个挣扎,我什至不知道这是否可能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_())

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

4

0 回答 0