PyQt question

Boudewijn Rempt boud at valdyas.org
Tue May 14 01:12:32 EDT 2002


Adonis wrote:

> on a QTextView object, how do i send it text? i have looked around and the
> information is way too overwhelming and in most cases unclear, considering
> im a newbie to PyQt. this is what i have so far..
> 

Well, first, QTextView is obsolete, so you should probably 
prefer to use QTextEdit, which you make read-only with 
QTextEdit.setReadOnly(True). While QTextEdit is a fairly
large class -- it really is a rich text editor -- setting
text is still easy: use QTextEdit.setText(text). Qt is very
consequent, and every widget that displays text has a setText(text)
method.

> 
> dont be deceived.. this is all Qt Designers work + pyuic:
> 

<....>

This is just placing the widget, layouting it and settting a font.
-- 
Boudewijn Rempt | http://www.valdyas.org



More information about the Python-list mailing list