Column width sensitive kerning in QTableView
Hi,
in tables on OS X there is some kerning property which automatically scales a bit, when the width of the column gets small enough. This can also be seen in the Finder for example. When you resize the column the text gets a bit narrower at first before the ellipsis dots appear.
Is this possible to emulate in Qt also or will I have do inherit from dedicated Cocoa or Carbon classes in order to have a widget that allows me to do this?
In NSTextView you have the methods loosenKerning and tightenKerning for example, although this does not apply automatically in a table. (I’m not a Cocoa developer so I don’t know where to set this property on OS X either.)
Hopefully, someone knows what I’m talking about.
Any ideas how to implement this?
/rike
Re: Column width sensitive kerning in QTableView
QFont has a kerning property. (see QFont::kerning(), also see QFont::setLetterSpacing())
So you could write code that upon a resize adjust the font('s kerning) property for that column.
Re: Column width sensitive kerning in QTableView
Thanks. I hoped that someone had done this earlier and there is an implementation to it available.