Results 1 to 5 of 5

Thread: lp error : no default destination available

  1. #1
    Join Date
    Oct 2010
    Posts
    21
    Thanks
    3
    Qt products
    Qt Jambi
    Platforms
    Unix/X11

    Default lp error : no default destination available

    I am trying to print a webpage by calling the print() function of class WebView. The steps were :

    Qt Code:
    1. QPrinter printer;
    2. QPrintDialog setup1(printer);
    3. setup1.exec();
    4. browser.print(printer); // browser is a QWebView object
    To copy to clipboard, switch view to plain text mode 

    1. When the QPrintDialog shows up, the name of the printer is not there which is understandable as there is no printer attached. The output file's name is also shown. But when I click on Print, the message is
    "lp: Error - no default destination available."

  2. #2
    Join Date
    Oct 2010
    Posts
    21
    Thanks
    3
    Qt products
    Qt Jambi
    Platforms
    Unix/X11

    Default Re: lp error : no default destination available

    Printing procedure must be very common on Qt applications. Its imperative to my application. If any one can just provide the steps or c++ code for simple printing. What I did (as posted above) gave the error : "lp: Error - no default destination available."

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: lp error : no default destination available

    If there's no printer attached, how do you expect it to work?

  4. #4
    Join Date
    Oct 2010
    Posts
    21
    Thanks
    3
    Qt products
    Qt Jambi
    Platforms
    Unix/X11

    Default Re: lp error : no default destination available

    Into the output file "print.pdf"

  5. #5
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: lp error : no default destination available

    Did you check to option to save to a file?

    If the goal is to print to a pdf file, then do not use the print dialog. Set the output format directly in the printer.

Similar Threads

  1. QUdpSocket - how to get destination address of a datagram?
    By nelliekins in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2009, 08:59
  2. How to find the Space on destination disk from QFileDialog?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2008, 13:36
  3. Multiple destination target
    By mdecandia in forum Qt Programming
    Replies: 9
    Last Post: 13th June 2007, 16:42
  4. Release and debug destination path
    By mdecandia in forum Qt Programming
    Replies: 0
    Last Post: 18th May 2007, 14:45

Tags for this Thread

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.