Results 1 to 7 of 7

Thread: QPrintDialog lists no printers

  1. #1
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QPrintDialog lists no printers

    Hi all,

    I'm trying to print something from my application, but the QPrintDialog shows no printers, whereas for instance kwrite does show a list of printers.

    Running lpstat -a shows a (correct) list of available printers, and CUPS is installed correctly.

    This is on a Debian 4.0 system with 2.6.20.1 kernel and Qt 4.3.0. I believe Qt was configured with cups support, but running
    Qt Code:
    1. find /usr/local/Trolltech/ | grep cups
    To copy to clipboard, switch view to plain text mode 
    shows nothing. On the other hand, I don't know if it should.

    Any help/directions?

    Thanks on this friday-afternoon-on-which-I-greatly-dislike-stupid-problems (don't we all).

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPrintDialog lists no printers

    Quote Originally Posted by TMan View Post
    I believe Qt was configured with cups support
    Could you check configure output to assure that cups support was enabled?
    J-P Nurmi

  3. #3
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrintDialog lists no printers

    Quote Originally Posted by jpn View Post
    Could you check configure output to assure that cups support was enabled?
    I'll do that next monday when I'm back at work. However, cups is by default enabled and I'm 100% sure I didn't disable it. Will check anyway.

  4. #4
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrintDialog lists no printers

    Hmm, it seems cups support is disabled after all.

    Looks to me like Qt disables cups because I configure with -static. Is there a way to build Qt static and still enable cups support?

  5. #5
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrintDialog lists no printers

    Ah, problem solved.

    I missed the cups development files, so the config test failed. Problem probably solved

  6. #6
    Join Date
    Mar 2009
    Posts
    5
    Thanked 1 Time in 1 Post

    Default Re: QPrintDialog lists no printers

    I have the same problem. In linux, in the QPrintDialog only Print to File option is visible.
    (Print to PDF and Print to PS). No printer is listed.

    How did you solve the problem?

  7. #7
    Join Date
    Mar 2007
    Posts
    57
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPrintDialog lists no printers

    You need to install the cups development packages on your system, then reconfigure Qt with cups support and recompile/install.

    At least, that's what I did IIRC.

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.