<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QML TextEdit selectionColor &#x2F; selectedTextColor when using a QSyntaxHighlighter]]></title><description><![CDATA[<p dir="auto">Hi, I am writing a simple text editor using QML with some basic syntax highlighting delivered from a custom QSyntaxHighlighter class.</p>
<p dir="auto">The result looks like this:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/3f9090b9-3f11-4cf1-93b0-85d8273978ef.png" alt="35fbfea4-3162-4514-a8e6-50a79b4b2066-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Beautiful! However when I select some text it ends up looking like this:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/795d016d-aec2-4614-9cac-1263d9448e45.png" alt="45f6575d-5a5e-4706-b05e-176ef50b3c98-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As you can see the text all becomes white. I would like the text colour to not change and to retain my syntax highlighting colours but I'm not sure how to do this with a TextEdit.<br />
I know that the qml TextEdit component has properties for the selection colour (selectionColor) and the selected text color(selectedTextColor) but I see no way to have no selected text colour.</p>
<p dir="auto">Hopefully there's an easy way here that I'm missing.</p>
]]></description><link>https://forum.qt.io/topic/118193/qml-textedit-selectioncolor-selectedtextcolor-when-using-a-qsyntaxhighlighter</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 23:24:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/118193.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2020 12:06:46 GMT</pubDate><ttl>60</ttl></channel></rss>