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. Qt 5.5 print bug on Windows?
Forum Updated to NodeBB v4.3 + New Features

Qt 5.5 print bug on Windows?

Scheduled Pinned Locked Moved General and Desktop
qt5.5 print sup
7 Posts 4 Posters 2.2k Views 2 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.
  • R Offline
    R Offline
    Riki P
    wrote on last edited by Riki P
    #1

    Hi,

    the application I work on crashes on Windows if I

    • print a page
    • choose the 'Microsoft XPS Document Writer' printer and
    • press the button cancel when the system asks me the name of the XPS file

    At first I thought the error was in my application but I found that the same happens in QtCreator.
    In my case the crash happens in the slot connected to the signal paintRequested() of my QPrintPreviewWidget subclass:

    void LabelsPrintPreviewWidget::printLabels(QPrinter *printer)
    {
        if (!printer->isValid())
            return;
        QPainter painter(printer);    <- HERE 
        ...
    }
    

    The dialog to choose the name of the XPS file is shown when the line QPainter painter(printer); is executed and if I click on the Cancel button the application crashes.

    Does anybody know if this an error in my application (and QtCreator) or is it a bug in Qt 5.5 (on Windows)?

    Thanks
    ciao
    riki

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

      Hi and welcome to devnet,

      If you can reproduce this with a minimal compilable example then it's likely a bug. You should check the bug report system to see if it's something known.

      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
      • R Offline
        R Offline
        Riki P
        wrote on last edited by
        #3

        Thanks SGaist,

        I searched in the bug report system but did not find a similar issue so I submitted a new bug report (QTBUG-48203).

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

          Thanks for sharing the link

          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
          • T Offline
            T Offline
            TEMPEST
            wrote on last edited by TEMPEST
            #5

            @Riki-P @SGaist
            In bug report QTBUG-48203
            It seems that it is solved in Qt5.6
            so how can we do in Qt5.5? Or the only way to solve this is using Qt5.6?

            1 Reply Last reply
            0
            • aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @TEMPEST:

              From the bug report you get to the fix on Gerrit: https://codereview.qt-project.org/126691

              This fix was submitted to the 5.5 branch, but I cannot tell you if it is contained in a 5.5.x version. The bug report mentions it is in 5.6.

              So yes, upgrading to Qt 5.6 is the official solution.

              Or you can also build Qt yourself from the 5.5 branch, which contains the fix.
              https://wiki.qt.io/Building_Qt_5_from_Git contains the steps needed for this.

              Qt has to stay free or it will die.

              T 1 Reply Last reply
              4
              • aha_1980A aha_1980

                @TEMPEST:

                From the bug report you get to the fix on Gerrit: https://codereview.qt-project.org/126691

                This fix was submitted to the 5.5 branch, but I cannot tell you if it is contained in a 5.5.x version. The bug report mentions it is in 5.6.

                So yes, upgrading to Qt 5.6 is the official solution.

                Or you can also build Qt yourself from the 5.5 branch, which contains the fix.
                https://wiki.qt.io/Building_Qt_5_from_Git contains the steps needed for this.

                T Offline
                T Offline
                TEMPEST
                wrote on last edited by
                #7

                @aha_1980 thanks for repling
                i will give it a try

                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