Results 1 to 2 of 2

Thread: select a printer question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default select a printer question

    Hi, I am running Ubuntu 8.10
    I have a table written in Qt-4. (see attachment). I want to print the table part. I have a printer connected (Deskjet-5740). I am totally confused on how to start the printer module. (I had printed this type of program when I was using Qt-3.),
    Qt Code:
    1. void PrintIndex::slotPb5()
    2. {
    3. QString path, k;
    4.  
    5. int corner[17][2];
    6. int side, m, n, count, counter, base;
    7. double a, b, x, y;
    8. bool ret;
    9.  
    10. QPrinter myprinter; // = new QPrinter();
    11. myprinter.setPageSize( QPrinter::Legal );
    12. myprinter.setOrientation( QPrinter::Landscape );
    13. myprinter.setColorMode( QPrinter::Color );
    14. myprinter.setFullPage ( true );
    15. ret = myprinter.setup();
    16. if( ret == true )
    17. {
    18. QPainter p( &myprinter );
    To copy to clipboard, switch view to plain text mode 
    I would appreciate your help very much
    Thank you

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.