Underlining words in a QTextEdit
-
@Fuchsiaff
What about starting by reading through https://forum.qt.io/topic/70932/how-to-change-font-weight-at-various-locations-within-a-qtexteditThat's the high-level. Otherwise I think you would be looking at writing code at the painting/drawing level.
-
@Fuchsiaff
here's an example: https://wiki.qt.io/Spell-Checking-with-Hunspell (seeDialog::checkSpelling()
)
in C++ though, but maybe it helps? -
@JonB
Styling with HTML is really not what I want to do since I want to apply the same technique later to a QPlainTextEdit.I have tried applying character formats on words before but that either made my program crash with a SIGSEGV error or crash without any errors
-
@raven-worx That's exactly what I was looking for, thank you!
-
@Fuchsiaff
I don't understand: @raven-worx 's example usesQTextEdit
and you just said you need to useQPlainTextEdit
? It also does apply character formats to words".