Carlsberg
22nd May 2009, 07:08
I am trying to get the cursor position in a QPlainTextEdit. So I get the the cursor object and the call columnNumber().
The problem appears where I have tab characters on that line.
At the end of the line for a text like this
AB
columnNumber() returns 2
If I have a tab 4 characters long
[TAB4]AB
columnNumber() returns 3, but I need the "real" column number -> 6
Is there a function that returns that value?
The problem appears where I have tab characters on that line.
At the end of the line for a text like this
AB
columnNumber() returns 2
If I have a tab 4 characters long
[TAB4]AB
columnNumber() returns 3, but I need the "real" column number -> 6
Is there a function that returns that value?