Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 9

Qt-interest Archive, March 2002
getting at the "rich text markup" in a QTextEdit


Message 1 in thread

Hello,
   I am trying to write a small word processor using QT 3.0 on a Red Hat 
Linux 7.1 system and was wondering if there is any way to get at the markup 
information the the QTextEdit widget uses to format the document it is 
displaying?  I will include the marked up file as a sample.  I have extended 
the QTextEdit class so that I could add some additional functionality to it, 
and from within the destructor I have the following two lines of code:
	cout<<"The text contained is:\n";
	cout<<text()<<'\n';
If I load the test file I am sending to this list then close the app, the 
only thing that gets output is 
The text contained is:
b

Is there any way to get at the markup that was loaded into the class?  I 
would like to be able to edit these tables at some point and be able to save 
them.  This by the way works as expected if I send it a file that does not 
use any markup,  I can't really say a plain text file since it seems that it 
saves even latin text in some sort of unicode encoding.  In the end I intend 
to display characters in other char sets other than latin chars.

Thank you for your time,
John Pitz
<qt>

<TABLE>
	<tr><td>1</td><td>2</td></tr>
	<tr><td>one</td><td>two</td></tr>
</TABLE>

</qt>