View Full Version : margins in QTextEdit/QPlainTextEdit
corrado
21st April 2010, 22:38
Hi everyone,
is it possible to set different margins for different text blocks in QTextEdit/QPlainTextEdit?
Thanks in advance
Lykurg
22nd April 2010, 07:40
Have you tried to use QTextBlockFormat::setLeftMargin()/QTextBlockFormat::setTopMargin()/...
corrado
22nd April 2010, 09:35
Have you tried to use QTextBlockFormat::setLeftMargin()/QTextBlockFormat::setTopMargin()/...
yes, i tried it, but it doesn't work, here is the code:
class MyWidget(QPlainTextEdit):
def func(self):
block = self.firstVisibleBlock()
while block.isValid():
block = block.next()
block.blockFormat().setLeftMargin(<some_value>)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.