Results 1 to 3 of 3

Thread: Weird behaviour of QPainter::render() in QT 6.0.0

  1. #1
    Join Date
    Nov 2010
    Location
    Caccamo (PA), Italy
    Posts
    13
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Weird behaviour of QPainter::render() in QT 6.0.0

    Good morning to all.
    I'm developing a project that needs to create some QR codes. I realized it using a QGraphicsScene, populate it with grahics and text, and then saving any scene in SVG and PDF using a for cycle.

    I started using QT6.0.0; I noticed that the graphics elements used to populate the scene were correctly saved. Instead, the text was saved in SVG files, but not saved in PDF files.

    After several attempts, I switch the configuration to QT 5.15.2, and all was correctly stored!!

    All fine, except that the SVG shows a different text font size for the same scene.

    So, there are two suspected bugs:

    1. When I save the same scene in SVG and PDF, I obtain a different graphical representation for text;
    2. Using QT 6.0.0, saving the scene in SVG is correct; in PDF the system doesn't print text.

    I link a project that shows what I say.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    552
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Weird behaviour of QPainter::render() in QT 6.0.0

    Update to a more recent Qt6 version. See also https://bugreports.qt.io/browse/QTBUG-89727

  3. The following user says thank you to ChristianEhrlicher for this useful post:

    glafauci (2nd June 2021)

  4. #3
    Join Date
    Nov 2010
    Location
    Caccamo (PA), Italy
    Posts
    13
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Weird behaviour of QPainter::render() in QT 6.0.0

    Thank you, Christian. I update my Qt version to 6.1.1 and I fixed the bug concerning missing text.

    But the difference between SVG and PDF file is still on. See the images to view what I say.
    Screenshot_20210602_174901.png


    Added after 12 minutes:


    Furthermore, I test to show the QgraphicsScene in a QGraphicsView. The result is identical to the file stored in PDF format, so the bug seems to stay in the SVG storing elaboration, obtained via QSvgGenerator, a module provided with Qt.

    Is it a bug?
    Last edited by glafauci; 2nd June 2021 at 17:04.

Similar Threads

  1. Weird Android behaviour
    By ObiWanKenobe in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2015, 09:57
  2. Weird QwtLegend Behaviour
    By BettaUseYoNikes in forum Qwt
    Replies: 1
    Last Post: 19th July 2011, 07:28
  3. weird behaviour with QItemSelectModel
    By Bebert218 in forum Qt Programming
    Replies: 0
    Last Post: 8th July 2011, 02:02
  4. QDockWidget on 4.6.X , weird behaviour
    By benacler in forum Qt Programming
    Replies: 0
    Last Post: 8th April 2010, 14:44
  5. weird repaint() behaviour
    By georgie in forum General Discussion
    Replies: 1
    Last Post: 1st May 2006, 13:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.