Results 1 to 4 of 4

Thread: QTextEdit - how to page break

  1. #1

    Default QTextEdit - how to page break

    Hi everyone,

    I have a very long rich text (html long text), and i want to display it on a QTextEdit without scrollbar, breaking the text in multiple pages (or qtextedit)

    Anybody knows how can i do this?

    Thanks in advance

    K

  2. #2
    Join Date
    Jan 2013
    Location
    Wisconsin
    Posts
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTextEdit - how to page break

    I know <DIV style=\"page-break-after:always\"></DIV> will add a page break via HTML have no idea how your context will render it - works great for making pdf's

  3. #3
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextEdit - how to page break

    make your own widget
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  4. #4

    Default Re: QTextEdit - how to page break

    <DIV style=\"page-break-after:always\"></DIV> doesn't work with the html subset of Qt (css properties are only added to html-table)

    i tried to do my own widget with QFontMetrics and generating a new QTextDocument but when I insert a block to the new QTextDocument it always append blank character :-(

Similar Threads

  1. Need : QTextEdit with page break
    By kuku83 in forum Qt Programming
    Replies: 0
    Last Post: 14th January 2013, 10:54
  2. QWebView and css page break property
    By haldrik in forum Qt Programming
    Replies: 0
    Last Post: 31st October 2012, 02:57
  3. Replies: 0
    Last Post: 11th November 2010, 08:58
  4. Replies: 0
    Last Post: 27th August 2010, 08:05
  5. How to add page break when printe a webview to PDF format
    By richardander in forum Qt Programming
    Replies: 1
    Last Post: 18th December 2009, 15:21

Tags for this Thread

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.