qtdeclarative/examples/quickcontrols/texteditor/qml
Shawn Rutledge 17a225f09a TextEditor example: allow setting multiple font attributes
When a user activates the boldAction for example, the code was replacing
QTextCharFormat's font with a default-constructed font that has the bold
attribute set, which meant that it could not be bold, italic, underlined
struck out, and with a custom size and color at the same time. On the
other hand, when we do it the current way:
  textArea.cursorSelection.font.bold = checked
we call QQuickTextSelection::font(), QFont::setBold(), and then
QQuickTextSelection::setFont(). (QFont is a QML value type, so it's the
only way.) Perhaps at some point, something was going wrong with that,
but it seems to work now.

Amends 045f9ce192

Fixes: QTBUG-136250
Pick-to: 6.8 6.9
Change-Id: I268e5814e7aa52aeb5aaec2d1a8fbfbc0d670236
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2025-04-29 21:08:27 +02:00
..
+touch Update manual tests and examples for change in default size policy 2024-02-21 14:27:54 +01:00
texteditor.qml TextEditor example: allow setting multiple font attributes 2025-04-29 21:08:27 +02:00