<div dir="ltr"><div dir="ltr"><div>Hi Michael,<br></div><div>I attached an example file on this post,But I summarized the part that I want to work on it.I retrieve data from sqlite and set it into textedit and here I have just added 2 strings in it.for addition I have to say my data is Arabic text.before this I have found a way to compile the exact thing to highlight but now the problem is the low speed with more data. <br></div><div>Thanks for your advice about profiling codes.<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 16, 2018 at 8:00 AM michael h <<a href="mailto:michaelkenth@gmail.com">michaelkenth@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.1pt">doc.setDefaultStyleSheet(<font face="monospace, monospace"><span class="highlight">found</span></font>)<br><code><span class="m_-7225432585895105533m_2058158689121283743gmail-pln"></span></code></pre></div></div></div></div></div></div></div></div></div></blockquote><div>This is where the css rules go, not the html</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono";font-size:9.1pt"><code><span class="m_-7225432585895105533m_2058158689121283743gmail-pln">doc</span><span class="m_-7225432585895105533m_2058158689121283743gmail-pun">.</span><span class="m_-7225432585895105533m_2058158689121283743gmail-pln">setHtml()<br></span></code><br></pre></div></div></div></div></div></div></div></div></div></blockquote><div>this would be where you set the html</div><div><br></div><div><br></div><div>Aside from that:</div><div><br></div><div>- Profile the code because the issue may not be where you expect it</div><div>- You might look into using QSyntaxHighlighter, which would allow you to highlight without inserting HTML markup.</div><div>- If you could post a self contained runnable example I'd take a closer look<br></div></div></div>
</blockquote></div>