Important: Please read the Qt Code of Conduct -

Why are parts of QTextCharFormat not implemented in QTextOdfWriter and when will they be?

  • I am writing a QSyntaxHighlighter for a custom document in our software.
    That document needs to support both clickable anchors (i.e. href's to other documents), as well as tooltips for those anchors.

    I was delighted to see that QTextCharFormat already comes with a setTooltip and setAnchor method. Though using those didn't do anything. Scouring the QT source a bit, I found that those specific features aren't implemented in QOdfTextWriter(for which I cannot find a reference):

    My questions now are:

    1. Is that a bug/forgotten thing?
    2. If it isn't, is there a plan for when those things are going to be implemented?
    3. If the answer to 2. isn't "very soon, dw" - how could I approach to implement these features myself?

    To elaborate on 3. we basically want to support the standard text-edit functionality:
    bold, italic, underlined, and strikethrough text, different font sizes, lists, table of contents, coloured text, aligned text, and the two special features I mentioned:

    1. Clickable links that we can connect a slot to linkClicked(QString link) which will also
    2. Display a tooltip when hovered.

  • Lifetime Qt Champion

    @Folling It would be better to ask this on Qt developers mailing list as this forum is more user oriented.

  • Ah, pardon me!
    I'll relay the question there!

Log in to reply