Qt 6.11 is out! See what's new in the release
blog
How to change the "selectionColor" property of TextEdit for the whole QML application
-
Hey, the default selection color for the TextEdit is a dark blue, which I don't really like. I'd like my whole application to have a lightblue selection color. Now my project contains a lot of QML code, and I don't want to change all of it manually, is there a way I can set it as the default for the whole application?
-
There's two ways that I know of.
- Use Material, define accent and theme.
- Wrap the TextEdit in your component (for example CustomTextEdit), and set the color there. Then instead of TextEdit, use CustomTextEdit everywhere.
-
There's two ways that I know of.
- Use Material, define accent and theme.
- Wrap the TextEdit in your component (for example CustomTextEdit), and set the color there. Then instead of TextEdit, use CustomTextEdit everywhere.
@Marko-Stanke Thanks, the second way seems easy enough using search/replace tools to apply to to my whole project.
-
C Creaperdown has marked this topic as solved on