Important: Please read the Qt Code of Conduct -

Qt is crashing when showing this tooltip. Why?

  • My Qt application keeps on crashing when "this tooltip": is shown

    To reproduce the problem just set a widget tooltip in the following way:

    @QFile file ( "tooltip.txt" ) ;;
    QTextStream stream(&file);
    QString tooltipText = stream.readAll();


    I'm using the latest version of Qt (4.6.3) on Windows
    I'm going to submit a bugreport, but in the meanwhile can anyone suggest me a solution to fix this crash problem?

    Thanks in advance for your help

  • It's strange, because with root rights i don't get crash and have Plastique style on widget. But without root rights i have Windows Classic style (Ubuntu) and crash with this errors:

    0x005354a3 in (anonymous namespace)::LineBreakHelper::adjustRightBearing (this=0xbfffdf18,
    maxGlyphs=2147483647) at /var/tmp/qt-src/src/gui/text/qtextlayout.cpp:1692

    Something wrong here:

    @ inline void adjustRightBearing()
    if (currentPosition <= 0)

            qreal rb;
            fontEngine->getGlyphBearings(currentGlyph(), 0, &amp;rb);
            rightBearing = qMin(QFixed(), QFixed::fromReal(rb));

  • For me too it is crashing in that function, and precisely when currentGlyph() is called.

  • Moderators

    Does it crash when using other styles (run the application with @appname -style STYLENAME@)? That would narrow the issue down to the style used:-)

    Please consider filing a "bugreport": providing as much information as possible.

  • where can I find the list of styles strings I can launch the application with?

  • Moderators

    That is indeed a bit tricky:-) The following piece of code dumps the names:

    @#include <QtGui/QStyleFactory>
    #include <QtCore/QtDebug>

    int main(int, char *)
    QStyleFactory *sf = new QStyleFactory;
    qDebug() << sf->keys();
    delete sf;

  • Thanks Tobias for the trick.

    Well I tested the application against the following styles:


    It crashes only with WindowsXP and Cleanlooks styles

  • Moderators

    Good... Please report a bug against those styles then.

Log in to reply