Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [IOS] undefine qt_no_printer on IOS
Forum Updated to NodeBB v4.3 + New Features

[IOS] undefine qt_no_printer on IOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 1.1k 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
    sftpck
    wrote on last edited by
    #1

    Hello.

    I know that print support is not available for ios, but I would like to make some tests and I need to undefine QT_NO_PRINTER.

    How/where can I undefine QT_NO_PRINTER.

    Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean you want to build Qt for iOS with printing support ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sftpck
        wrote on last edited by
        #3

        Hi.

        If by building with printing support the variable QT_NO_PRINTER gets undefined, then yes that will do. Do I need to pass any special parameter to config to build for iOS with printing support?

        Thank you for your reply.

        J.HilkJ 1 Reply Last reply
        0
        • S sftpck

          Hi.

          If by building with printing support the variable QT_NO_PRINTER gets undefined, then yes that will do. Do I need to pass any special parameter to config to build for iOS with printing support?

          Thank you for your reply.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @sftpck can you say bait more about what you actually want to test, and what the issue is?

          Messing with the Qt source code should be the last resort


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

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

            We are building an application that needs printing support. The application compiles on windows/linux/macos/android. We are now trying to compile the application on iOS. When we choose iOS toolkit to compile the application, file qprinterinfo.h (for example) has a #ifndef QT_NO_PRINTER block and everything inside is grayed out (on Qt creator) because the QT_NO_PRINTER is defined.

            Since our application needs some form of printing (create pdf, AirPrint), the idea was to create a plugin for iOS based on the cocoa print plugin.

            J.HilkJ 1 Reply Last reply
            0
            • S sftpck

              We are building an application that needs printing support. The application compiles on windows/linux/macos/android. We are now trying to compile the application on iOS. When we choose iOS toolkit to compile the application, file qprinterinfo.h (for example) has a #ifndef QT_NO_PRINTER block and everything inside is grayed out (on Qt creator) because the QT_NO_PRINTER is defined.

              Since our application needs some form of printing (create pdf, AirPrint), the idea was to create a plugin for iOS based on the cocoa print plugin.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @sftpck said in [IOS] undefine qt_no_printer on IOS:

              Since our application needs some form of printing (create pdf, AirPrint), the idea was to create a plugin for iOS based on the cocoa print plugin.

              IIRC QPdfWriter works on all platforms.


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              S 1 Reply Last reply
              0
              • J.HilkJ J.Hilk

                @sftpck said in [IOS] undefine qt_no_printer on IOS:

                Since our application needs some form of printing (create pdf, AirPrint), the idea was to create a plugin for iOS based on the cocoa print plugin.

                IIRC QPdfWriter works on all platforms.

                S Offline
                S Offline
                sftpck
                wrote on last edited by
                #7

                @J.Hilk said in [IOS] undefine qt_no_printer on IOS:

                IIRC QPdfWriter works on all platforms.

                But that means we would need to change our code in order to replace everything print related to support a specific iOS case.

                Is it possible to compile Qt framework for iOS with printing support?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Wait, the fact that Qt Creator shows something grayed out doesn't mean it is necessary disabled when you build it. Qt Creator doesn't necessarily find everything that allows it to do the highlighting propel.

                  After a quick check of the printsupport module, I haven't seen anything disabling it for iOS (I may have missed something though). If you want to check whether your modifications are building, put some blatant error in the code or are an #error statement in it and compile Qt.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sftpck
                    wrote on last edited by
                    #9

                    It doesn't build. I don't have the machine with me right now, but with a new project and this sample code https://doc.qt.io/qt-5/qprinter.html#isValid I can compile without any problems with macos kit, but changing to iOS kit, I get compile errors. (and inspecting the header https://github.com/qt/qtbase/blob/5.12/src/printsupport/kernel/qprinter.h, everything inside #ifndef QT_NO_PRINTER block is grayed out with iOS kit, but not with macOS kit)

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @sftpck said in [IOS] undefine qt_no_printer on IOS:

                      QT_NO_PRINTER

                      You have to modify qtbase/src/printsupport/configure.json so that the tests are run for iOS and maybe pass without other modifications.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      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