PDA

View Full Version : Outputting text



kroenecker
13th January 2006, 02:57
I want to make a simple application that reads a text file and displays the text in a window. I am new to gui programming and am wondering what widget I need to use.

Thanks.

GreyGeek
13th January 2006, 03:28
There is a demo editor app that does that.
Search the demo directory of your QT install and/or look in the tutorial/examples section of the "Assistant".

kroenecker
13th January 2006, 05:23
Thanks for the reply. The text editor isn't exactly what I'm looking for. I want to be able to display text that can't be modified by the user. For instance if I have a list of japanese words in a text file, I want to be able to display the information as if it were a flash card.

Now if the text editor will let me do that, then I'll give that a go.

Thanks again.

kroenecker
13th January 2006, 05:39
Looking into another tutorial it appears that I just need to derive from QWidget and use repaint and paintEvent :D

sunil.thaha
13th January 2006, 07:32
Make the TextEdit readonly.
Or You can use QLabel

wysota
13th January 2006, 12:08
You can just use QTextBrowser.