Results 1 to 2 of 2

Thread: Computing page breaks

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Location
    Warsaw
    Posts
    1
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Computing page breaks

    Hello,
    I have to one issue in Qt3-based Kexi "printouts" plugin.
    The printouts look like this http://kexi-project.org/pics/1.1.3/printing_images.png

    The problem is that when you have, say, "Description" field filled with really large text that cannot fit on a single page, I need to somewhat split the text between pages.
    Things taht internally deal with wordwrapping in Qt3, e.g. QTextCursor is private here. I also do not use 3rdparty replacement like kotext in this plugin.

    Summing up, what I would like to have is a function like:

    Qt Code:
    1. uint numberOfCharactersThatCanFitInARectangle(const QRect7 rect, const QString& text);
    To copy to clipboard, switch view to plain text mode 

    I could then paint first N characters on a QPainter and then go to another page and repeat the whole routine for the remaining text.

    Thanks in advance,

    Jaroslaw Staniek
    Last edited by wysota; 20th November 2007 at 14:52. Reason: Removed the link to docs

Similar Threads

  1. QWidget display on 2 stack widget page
    By spawnwj in forum Qt Programming
    Replies: 3
    Last Post: 4th September 2006, 13:07

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.