[QScintilla] Width from Line nummer column

Baz Walter bazwal at ftml.net
Fri Jan 4 18:49:06 GMT 2008


ciz at ciz.ch wrote:
> Happy new year to all,

Happy New Year to you

> My question:
> How i can render more width the line nummer column?
> on CTRL+  nummer can not read..
> setMarginLineNumbers(1,true);

You can set the width with setMarginWidth(1, width). width can be the 
required width of the margin in pixels, or a QString with the length 
needed to fit in the margin.

You could dynamically change the width of the line number margin by 
connecting to the linesChanged() signal. in the handler, make a string 
of the right length with QString().setNum(lines()) and pass the result 
to setMarginWidth().

HTH

Regards,
Baz Walter


More information about the QScintilla mailing list