Results 1 to 4 of 4

Thread: how to print QTable?

  1. #1
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default how to print QTable?

    How can I print QTable?QTable doesn't provide function for printing.
    Thanks a lot!

  2. #2
    Join Date
    Dec 2006
    Location
    Wuhan, China
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to print QTable?

    You can write print code yourself, such as:
    QPrinter printer(QPrinter::HighResolution);
    printer.setOutputFileName("print.ps");
    QPainter painter;
    painter.begin(&printer);

    for (int page = 0; page < numberOfPages; ++page) {

    // Use the painter to draw on the page.

    if (page != lastPage)
    printer.newPage();
    }

    painter.end();

  3. The following user says thank you to zeki709 for this useful post:

    coralbird (30th March 2007)

  4. #3
    Join Date
    Jan 2006
    Location
    Edmonton, Canada
    Posts
    101
    Thanks
    13
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to print QTable?

    Alternatively you could build build a HTML table based on your data, put it in a QTextDocument and print that. Depending on your requirements, this may be easier or faster.

  5. The following user says thank you to Jimmy2775 for this useful post:

    coralbird (30th March 2007)

  6. #4
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: how to print QTable?

    thanks a lot!!

Similar Threads

  1. Regarding alignment in QTable
    By joseph in forum Qt Programming
    Replies: 4
    Last Post: 5th December 2006, 10:35
  2. copy-paste the content of a QTable
    By greencastor in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2006, 12:20
  3. QTable gives error when put on a dialog??
    By darpan in forum Qt Tools
    Replies: 3
    Last Post: 7th August 2006, 19:57
  4. Problem with QTable
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 10:00
  5. QTable..Vs.. QListView
    By :db:sStrong in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 21:03

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.