Results 1 to 4 of 4

Thread: QPrinter

  1. #1
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QPrinter

    Hello,

    Now I'm creating a ticket for my supermaket application, so I need to print. My objective is to setFullPage to print in (0,0) coordinate, but this don't have effect always there's 3 or 4 white lines. And in the next code I put QPrinter::A4 but when it shows me the dialog always there's letter format.

    QTextDocument *document = qTextEdit->document();
    QPrinter printer;

    printer.setFullPage(TRUE);
    printer.setPageSize(QPrinter::A4);
    QPrintDialog *dialog = new QPrintDialog(&printer, this);

    dialog->setWindowTitle(tr("Print Document from aklibs"));
    if (dialog->exec() != QDialog::Accepted)
    return;

    document->print(&printer);

    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrinter

    Could it be that the print dialog picks the paper size information from the current printer?

  3. #3
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrinter

    Yes do it, but why don't take my params. Only I can change the number of copies, and don't take my paper size that I put in QPrinter, and the most important I can't print in coordinates (0,0).

    I no surrender....

  4. #4
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrinter

    I see the changes putting setFullPage(FALSE) or setFullPage(TRUE) , but don't start printing on (0,0)

Similar Threads

  1. Replies: 2
    Last Post: 31st August 2011, 16:15
  2. From QPrinter to QTextDocument
    By kemp in forum Qt Programming
    Replies: 1
    Last Post: 24th November 2006, 15:44
  3. How to use QPrinter without QPrintDialog?
    By pascal456 in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2006, 19:57
  4. left and right margins in QPrinter
    By igor_x in forum Newbie
    Replies: 0
    Last Post: 2nd November 2006, 10:42
  5. QPrinter on Solaris
    By ToddAtWSU in forum Qt Programming
    Replies: 4
    Last Post: 24th October 2006, 20:29

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.