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

QPainter::drawText crashes in Windows (linux not tested) when used from non QT application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 4.5.2, 4.5.3
    • GUI: Painting
    • None

    Description

      QPainter::drawtext crash when trying to use it within a dll linked from a NON QT application. If I test it against a QT application it works fine.

      QPainter created on QImage (successfully)
      QFont assigned to the QPainter (successfully)
      QPainter::drawRect works (successfully)
      QPainter::drawText crashes

      Attached you can find a simple example of the bug. The ZIP file contains a DLL written in C++ (using QTCreator and QT 4.5.2) and a vba code (used through excel) to link and run the dll.

      this is the VBA for those who can't get access to Excel

      Private Declare Sub CreateABlankJPGwithSomeText Lib "S:\QTBugReportTest\release\QTBugReportTest" Alias "CreateABlankJPGwithSomeText@8" (ByVal filename As String, ByVal sometext As String)
      Private Declare Sub CreateABlankJPGwithSomeRect Lib "S:\QTBugReportTest\release\QTBugReportTest" Alias "CreateABlankJPGwithSomeRect@4" (ByVal filename As String)
      '
      Public Sub Doit()
      '
      ' this one crashes
      ' Call CreateABlankJPGwithSomeText("C:\File.jpg", "Ciao")

      ' this one works
      Call CreateABlankJPGwithSomeRect("C:\File2.jpg")

      '
      End Sub

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            mxs Massimiliano Saba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes