Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26999

QPrinter/QPrintDialog pointer error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.2
    • GUI: Printing
    • None
    • pyqt v4.9.1

      mac osx (leopard, lion, mountain lion, both 32 and 64 bti)

    Description

      from PyQt4.QtGui import QApplication, QPrinter, QPrintDialog, QLabel, QPainter, QDialog
      import sys

      if name == '_main_':
      app = QApplication(sys.argv)

      printer = QPrinter()
      printDialog = QPrintDialog(printer, None)
      printDialog.setWindowTitle("Print page");
      if (printDialog.exec_() == QDialog.Accepted):
      printLabel = QLabel("Hello printer!")
      painter = QPainter()
      painter.begin(printer)
      printLabel.render(painter)
      painter.end()

      sys.exit(app.exec_())

      We get the following error:
      Python(817,0xa066a720) malloc: *** error for object 0xcd0200: pointer being freed was not allocated

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            turadani Daniela Tura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes