Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPrintDialog does not work

QPrintDialog does not work

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    juvf
    wrote on last edited by
    #1

    When the OS is not installed printer, QPrintDialog does not appear. Why?
    QPrintDialog should appear with one printer - "Install printer", and whit disabled button "Ok".

    ps OS Windows XP SP3, Qt5.4.0

    M 1 Reply Last reply
    0
    • J juvf

      When the OS is not installed printer, QPrintDialog does not appear. Why?
      QPrintDialog should appear with one printer - "Install printer", and whit disabled button "Ok".

      ps OS Windows XP SP3, Qt5.4.0

      M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      @juvf said:

      QPrintDialog should appear with one printer - "Install printer", and whit disabled button "Ok".

      Is a Feature request or is written is some docs?

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        juvf
        wrote on last edited by juvf
        #3

        @mcosta said:

        Is a Feature request or is written is some docs?

        No. I think it is obvious. If is not printer, QPrintDialog does not appear. Why? And does not appear MessageBox with massege about it.

        Try to print page from IE without printers. Try to print picture from Paintbrush. Print dialog does appear with one printer "Add printer", like this link text or like this link text
        And then try to print some text from TextEdit (run QDemo or build from QtCreator example). Why print dialog does not appear in TextEdit? User will be think, that program does not work.

        M 1 Reply Last reply
        0
        • J juvf

          @mcosta said:

          Is a Feature request or is written is some docs?

          No. I think it is obvious. If is not printer, QPrintDialog does not appear. Why? And does not appear MessageBox with massege about it.

          Try to print page from IE without printers. Try to print picture from Paintbrush. Print dialog does appear with one printer "Add printer", like this link text or like this link text
          And then try to print some text from TextEdit (run QDemo or build from QtCreator example). Why print dialog does not appear in TextEdit? User will be think, that program does not work.

          M Offline
          M Offline
          mcosta
          wrote on last edited by mcosta
          #4

          @juvf said:

          No. I think it is obvious.

          Sorry but I don't agree; could be obvious only IF the user has admin privileges and could add a Printer to the system (wrong practice in Windows world).

          BTW, Qt is a cross-platform toolkit and there's no cross-platform way to add a Printer to a system (Windows, OSX and Linux use different way to do that).

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          J 1 Reply Last reply
          0
          • M mcosta

            @juvf said:

            No. I think it is obvious.

            Sorry but I don't agree; could be obvious only IF the user has admin privileges and could add a Printer to the system (wrong practice in Windows world).

            BTW, Qt is a cross-platform toolkit and there's no cross-platform way to add a Printer to a system (Windows, OSX and Linux use different way to do that).

            J Offline
            J Offline
            juvf
            wrote on last edited by
            #5

            dasdfas

            @mcosta said:

            BTW, Qt is a cross-platform toolkit and there's no cross-platform way to add a Printer to a system (Windows, OSX and Linux use different way to do that).

            Ok. i argree. But why does not occur when user push button "Print" in the TextEditor from QtDemo? Button wokrs, nor any response to pressing. Users think that programm dosen't work.

            I want, that user of my program known, that my program works, there is no installed printer and user have to install some printer.
            How to verify that printer is not installed in OS, befor call QPrintDialog?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on last edited by mcosta
              #6

              QPrinterInfo::availablePrinters() returns the list of installed printers.

              or, for performance reason, use QPrinterInfo::availablePrinterNames()

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              J 1 Reply Last reply
              1
              • M mcosta

                QPrinterInfo::availablePrinters() returns the list of installed printers.

                or, for performance reason, use QPrinterInfo::availablePrinterNames()

                J Offline
                J Offline
                juvf
                wrote on last edited by
                #7

                @mcosta Thank you!

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by
                  #8

                  Hi,

                  please mark the thread as [SOLVED]

                  Once your problem is solved don't forget to:

                  • Mark the thread as SOLVED using the Topic Tool menu
                  • Vote up the answer(s) that helped you to solve the issue

                  You can embed images using (http://imgur.com/) or (http://postimage.org/)

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved