PDA

View Full Version : Text Editor



viglu
6th March 2010, 19:58
Hello,

I'm new to Qt. I need a text editor, with the following features
- page header / footer
- margins
- replace text
- export to PDF.

It's possible with Qt directly or need I to use other software.


Regards,
Luc

squidge
6th March 2010, 20:28
Start with a QTextEdit, and for the PDF export functionality, have a look at QPrinter - you can set the output type to PdfFormat.

vishwajeet.dusane
6th March 2010, 20:31
Hi

All these requirement are ppossible in Qt

Use QTextBrowser or QTextEdit

- page header / footer
need some simple implementation
- margins
- replace text
need some simple implementation, Hardly 1 slot with 2-3 lines of code
This is by default so no probs
- export to PDF.
Here u have to use xpdf 3rd party library to do so. its easy though

squidge
6th March 2010, 23:15
Here u have to use xpdf 3rd party library to do so. its easy thoughWhy, when QPrinter supports PDF output?

tsp
7th March 2010, 07:24
No need for 3rd party libraries for exporting content to PDF as fatjuicymole pointed out. There is a simple example in Qt documentation about how to write PDF file, see QPrinter::isValid

viglu
7th March 2010, 16:49
Can you tell me where I can find some example for implementing a page header/footer ?

boudie
8th March 2010, 22:54
If you use Linux, you certainly know Kate, the Advanced Text Editor.
So, why don't download the full Kate source from http://www.kate-editor.org/.