Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to duplex print?
Qt 6.12 LTS is out! See what's new in the release blog

How to duplex print?

Scheduled Pinned Locked Moved General and Desktop
14 Posts 2 Posters 3.4k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    I'm not sure I'm following you. Why would you need to set that ?

    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
    • A Offline
      A Offline
      AlexxanderX
      wrote on last edited by
      #3

      I updated the first post. I only want to print a double sided page/duplex directly/without using print dialog.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlexxanderX
        wrote on last edited by
        #4

        I updated the first post. I only want to print a double sided page/duplex directly/without using print dialog.

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

          Did you check that you are trying to use the correct printer ?

          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
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Did you check that you are trying to use the correct printer ?

            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
            • A Offline
              A Offline
              AlexxanderX
              wrote on last edited by
              #7

              Yes, and I will make a check function for it. But the code is right?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                AlexxanderX
                wrote on last edited by
                #8

                Yes, and I will make a check function for it. But the code is right?

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

                  How do you create m_printer ?

                  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
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    How do you create m_printer ?

                    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
                    • A Offline
                      A Offline
                      AlexxanderX
                      wrote on last edited by
                      #11

                      @m_printer = new QPrinter(QPrinter::HighResolution);
                      m_printer->setPageSize(QPageSize(QPageSize::A4));
                      m_printer->setOrientation(QPrinter::Portrait);
                      m_printer->setPageMargins(QMarginsF(20.f,20.f,10.f,10.f));@

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        AlexxanderX
                        wrote on last edited by
                        #12

                        @m_printer = new QPrinter(QPrinter::HighResolution);
                        m_printer->setPageSize(QPageSize(QPageSize::A4));
                        m_printer->setOrientation(QPrinter::Portrait);
                        m_printer->setPageMargins(QMarginsF(20.f,20.f,10.f,10.f));@

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

                          You should rather use the second constructor using QPrinterInfo to ensure you are using the right device

                          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
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            You should rather use the second constructor using QPrinterInfo to ensure you are using the right device

                            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
                            • Unsolved