Skip to content

Use QQuickWindow::setTextRenderType() for the default text rendering type

Noah Davis requested to merge work/ndavis/textrendering into master

I made this patch in response to a user's complaint about text rendering in Neochat. The issue was caused by Neochat using a TextEdit instead of a TextArea since qqc2-desktop-style sets the default renderType for TextArea and TextEdit always defaults to QtRendering if QQuickWindow::setTextRenderType() isn't used. The issue could have been fixed in Neochat by using a TextArea or by just setting the renderType, but I think it would be a good idea to fix this by default for all KDE apps that use qqc2-desktop-style.

I'm not sure where the best place to put this code is, so hopefully this is fine.


This affects QQuickText, QQuickTextInput and QQuickTextEdit based QML elements.

With integer scale factors, NativeTextRendering will be used.

With fractional scale factors, QtTextRendering will be used.

Even though https://bugreports.qt.io/browse/QTBUG-67007 is closed, there are still sometimes graphical issues when using native text rendering with fractional scale factors.

Edited by Noah Davis

Merge request reports