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. AvailablePrinters() function does not work on UBUNTU 12.04(64 bit) with Qt 5.0.0 (64 bit).
Forum Updated to NodeBB v4.3 + New Features

AvailablePrinters() function does not work on UBUNTU 12.04(64 bit) with Qt 5.0.0 (64 bit).

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.3k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    saharanvikas
    wrote on last edited by
    #1

    Hi,
    I am devolping on UBUNTU 12.04 (64 bit) and using Qt 5.0.0 (64 bit).
    i want to display the system available printers list using the following function:

     QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
    

    here it is not showing the appropriate output.
    but the same code is working properly in Qt 4.7.4 (32 bit) with UBUNTU 11.10 (64 bit).
    where is the problem. please share with me.
    thanks in advance.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      So are you using the same Qt version on the systems where this works? Is your latest ubuntu configured correctly and does it list the printers?

      Please "report a bug":https://bugreports.qt-project.org/ about this if the issue still persists with a the Qt 5 RC release.

      1 Reply Last reply
      0
      • _ Offline
        _ Offline
        _rmn
        wrote on last edited by
        #3

        He wrote that it is correctly works on ubuntu 11.10, but now he tried on ubuntu 12.04
        I have tested
        QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
        just now on KUbuntu 12.04 64bit with Qt5 RC1 and it works properly

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          He writes that the code works correctly with Qt 4.7.4 on ubuntu 11.10. It would be interesting to know whether Qt 5 works on ubuntu 11.10 or whether Qt 4.7.4 works on ubuntu 12.04.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            saharanvikas
            wrote on last edited by
            #5

            Thanks to all for quick response.

            Let's take one by one :

            Tobias Hunger :: So are you using the same Qt version on the systems where this works? Is your latest ubuntu configured correctly and does it list the printers?
            My Response :: 4.7.4 with Ubuntu 11.10 (64 bit) works fine. After that same 4.7.4 with Ubuntu 12.04 (64 bit) doesn't list the printers. Means same line of code is not executed. I tried with QT 5.0 RC1 on Ubuntu 12.04 (64 bit) results in same. Means, doesn't list the printers.

            Dear _rmn :: just now on KUbuntu 12.04 64bit with Qt5 RC1 and it works properly
            My Response :: Does this line means it is working fine on your system. I am using Ubuntu 12.04 and how much is it different from KUbuntu 12.04 for this I have to see. Welcome in case of any further suggestion.

            Again Tobias Hunger :: He writes that the code works correctly with Qt 4.7.4 on ubuntu 11.10. It would be interesting to know whether Qt 5 works on ubuntu 11.10 or whether Qt 4.7.4 works on ubuntu 12.04.
            My Response :: Yes code works correctly with Qt 4.7.4 on Ubuntu 11.10. I installed Qt 5 on Ubuntu 11.10 again the same issue i.e code is not compiling. And code 4.7.4 is not working with Ubuntu 12.04 also. Resulting in error

            Undefined reference to "QPrinterInfo::availablePrinters()"

            I compiled the same "code":https://blog.qt.digia.com/blog/2007/11/13/printer-information-support/ on BOSS 4.0 and It's working fine.

            Thanks to all. Waiting for valuable suggestions if any.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              saharanvikas
              wrote on last edited by
              #6

              Boss with 4.7.4 (32 bit).. :-)

              Request to ignore it for concluding the results.

              1 Reply Last reply
              0
              • _ Offline
                _ Offline
                _rmn
                wrote on last edited by
                #7

                About "Undefined reference to “QPrinterInfo::availablePrinters()”" error with Qt5:
                Have you added
                @
                QT += printsupport
                @

                to .pro file?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  saharanvikas
                  wrote on last edited by
                  #8

                  Thanks to _rmm. It worked.

                  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