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)
Qt Code:
  1. ...
  2. blockText = document()->findBlockByNumber(i).text();
  3. for( int j=0; j<blockText.size(); j++)
  4. {
  5. QTextCursor c = textCursor();
  6. c.setPosition(document()->findBlockByNumber(i).position()+j);
  7. QColor q = c.charFormat().foreground().color();
  8. ....
To copy to clipboard, switch view to plain text mode 

why?