Results 1 to 7 of 7

Thread: Print a QDialog in a PDF file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X

    Unhappy Print a QDialog in a PDF file

    Hi,

    I have to save a QDialog : mainWindow (with all his children : QTextEdit, QTableView, ...) in a pdf file.

    But when I do that :
    Qt Code:
    1. prn.setOutputFileName("out.pdf");
    2. QPrintDialog(&prn, mainWindow).exec();
    3. mainWindow.render(&prn);
    To copy to clipboard, switch view to plain text mode 

    Only mainWindow is printed
    How can I print all children ?

    Thanks
    Last edited by jpn; 22nd February 2008 at 16:32. Reason: changed [qtclass] to [code] tags

Similar Threads

  1. how to print an html file?
    By patcito in forum Qt Programming
    Replies: 5
    Last Post: 31st August 2008, 16:50
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 18: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
  •  
Qt is a trademark of The Qt Company.