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

Diego Iastrubni diegoiast at gmail.com
Sun Apr 11 14:02:52 CEST 2010


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

On Fri, Apr 9, 2010 at 10:09 PM, John Weeks <john at wavemetrics.com> wrote:

> I would like to use a pair of QTextEdit widgets with a QSplitter arranged
> vertically. I would like to constrain the splitter to show no less than one
> line of text in either QTextEdit. Is that possible?
>
> Can I get the line height of a QTextEdit or the underlying QDocument?
>
> Should I use a QPlainTextEdit?
>
> Thank you!
>  Regards, John Weeks
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100411/16be43eb/attachment.html 


More information about the Qt-interest-old mailing list