Results 1 to 7 of 7

Thread: Text Editor

  1. #1
    Join Date
    Mar 2010
    Location
    Luxembourg
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Text Editor

    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

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Text Editor

    Start with a QTextEdit, and for the PDF export functionality, have a look at QPrinter - you can set the output type to PdfFormat.

  3. #3
    Join Date
    Sep 2009
    Posts
    72
    Thanked 10 Times in 10 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: Text Editor

    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

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Text Editor

    Quote Originally Posted by vishwajeet.dusane View Post
    Here u have to use xpdf 3rd party library to do so. its easy though
    Why, when QPrinter supports PDF output?

  5. #5
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Text Editor

    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

  6. #6
    Join Date
    Mar 2010
    Location
    Luxembourg
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Text Editor

    Can you tell me where I can find some example for implementing a page header/footer ?

  7. #7
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Text Editor

    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/.

Similar Threads

  1. How to Add Text to Editor in QTableView
    By klahey in forum Qt Programming
    Replies: 2
    Last Post: 2nd January 2010, 15:05
  2. Text editor in another application
    By ImQti in forum Qt Programming
    Replies: 4
    Last Post: 10th December 2009, 09:41
  3. Column Selection Text Editor
    By zyxue in forum Qt Programming
    Replies: 1
    Last Post: 20th June 2007, 08:28
  4. Implementation of right indentation in a text editor
    By sukanyarn in forum Qt Programming
    Replies: 11
    Last Post: 26th September 2006, 13:06
  5. a Text Editor with line numbers...
    By fullmetalcoder in forum Qt Programming
    Replies: 47
    Last Post: 5th April 2006, 11:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.