You can use QSyntaxHighlighter for that.
You can use QSyntaxHighlighter for that.
Thank you pastor for that valuable suggestion.
I'll surely look into it.
I've another problem, though. I'm intending to put the cursor, on opening of the source code in the editor, at a particular line number, in order to point out the function call or function name or variable declaration, which is the intention of showing up of source code [ since user would be directed to the point in the source code where he is interested in, when source code is displayed].
With the help of setCursorPosition() I'm able to move my cursor to a particular line number I wish to highlight. But I'm unable to place the cursor 'at' the real code, since it gets placed at the first index or 0th column[ for example, in case of indentation the code line would be tabbed from the first column, so the cursor will be at the start of the line and not at the start of the code!]
I'd really appreciate if anyone of you'll guide me and help me in this matter.
Thanks for spending the time.
Bookmarks