Important: Please read the Qt Code of Conduct -

Assert message a Qt bug or operator error?

  • I'm getting an error

    ASSERT: "!"Tspans should be drawn through QSvgText::draw()."" in file c:\users\qt\work\qt\qtsvg\src\svg\qsvggraphics_p.h, line 224

    in Qt 5.11.1 open source on Windows 7 pro running Fritzing (a Qt app). The same application on Linux doesn't get the assert. My question is does this indicate a bug in Qt that should be reported or is it trying to tell me there is an error of some kind in the application? I would think it points to a Qt bug, but I don't know enough about Qt to be sure of that.

    Peter Van Epp

  • Lifetime Qt Champion

    It sounds more like an App bug where it would draw an svg in some unexpected way.
    I would try report it to Fritzing forum and see what they find.

    did you compile the app yourself ?

    IT could also be that app was created with older version of Qt and something changed over the years
    so now its expected to call QSvgText::draw() and not QSvgTspan::draw.

    It does not look like a bug as its a deliberate check.
    virtual void draw(QPainter *, QSvgExtraStates &) {Q_ASSERT(!"Tspans should be drawn through QSvgText::draw().");}

  • Thanks, I'll poke at the app and see. The last Fritzing release (development has pretty much died) used Qt 5.6 which does work fine, so you are probably correct it is a change in api over the years. If I can find the calls and replace them I'll move up to 5.11.1, if not I may just stay on 5.6. I'll mark this solved.


Log in to reply