[QScintilla] Tab-Width

Phil Thompson phil at riverbankcomputing.com
Wed Nov 14 08:35:54 GMT 2007


On Wednesday 14 November 2007, Nicholas Sloan wrote:
> Alright, I'll probably be posting more often now, since I'm at a point
> in my project where a lot of my focus is going to be on the editor
> component.
>
> I am calling QsciScintilla::setTabWidth(2); in the constructor of a
> class that inherits QsciScintilla. I have used QsciScintilla::setFont();
> to set a monotype font. setTabWidth() is changing the tab-width, as
> expected, however, a value of 2 yields the width of approximately 1
> character. A value of 3 yields 1 and 1/2 characters, and a value of four
> actually yields the desired 2 characters. It appears that 1 "character"
> as set by setTabWidth() is about half the width of an actual character.
>
> Is this behavior desired or expected for some reason? I can't seem to
> find any rationale for it.

Are you setting a lexer? A small example would help.

Phil


More information about the QScintilla mailing list