im trying to check if a certain character is in a specific color (i used a highlighter to color them according to some rules)
i tried all sorts of routes but i always get no color..
for instance:
( i = block index, j=character index)
...
blockText = document()->findBlockByNumber(i).text();
for( int j=0; j<blockText.size(); j++)
{
c.setPosition(document()->findBlockByNumber(i).position()+j);
QColor q
= c.
charFormat().
foreground().
color();
....
...
blockText = document()->findBlockByNumber(i).text();
for( int j=0; j<blockText.size(); j++)
{
QTextCursor c = textCursor();
c.setPosition(document()->findBlockByNumber(i).position()+j);
QColor q = c.charFormat().foreground().color();
....
To copy to clipboard, switch view to plain text mode
why?
Bookmarks