[Qt-interest] QTextEdit line size, constraining size to integral lines

John Weeks john at wavemetrics.com
Mon Apr 12 18:18:46 CEST 2010


Diego Iastrubni wrote:

> You need to query the font and ask for it's size. See  
> QWidget::fontMetrics(),  QFontMetrics::height().

and Denis Akhmetzyanov wrote:

> One note: Using QFontMetrics::lineSpacing() is better for getting  
> line height.

Thank you both. On Friday I must have been blind. I did actually look  
in all the right places for just this sort of thing.

Regards, John Weeks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100412/eac7592f/attachment.html 


More information about the Qt-interest-old mailing list