[PyQt] How could I tell a QTextEdit to put the text in it at the bottom of the widget instead of the top?

inhahe inhahe at gmail.com
Sun Jun 14 15:45:23 BST 2015


When there's not enough text in the QTextEdit to require a scroll-bar, I
want what little text is in it to be placed at the bottom of the QTextEdit
instead of at the top (like for example, how it works in an mIRC window).
How could I do this?

I tried .setStyleSheet("position: absolute; bottom: 0")
and setStyleSheet("* {position: absolute; bottom: 0}"); those didn't work.

I thought about putting all my text in between <span
style="position:absolute; bottom:0"> and </span> (using .insertHtml), but
(presuming that would even work) that could introduce difficulties because
I'll be continually adding lines to the bottom of text inside the span and
I don't want to have to re-insert the entire scroll of text with the span
tags around it each time I add a line..

Thanks for any help..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150614/184aee86/attachment.html>


More information about the PyQt mailing list