Results 1 to 9 of 9

Thread: QFontMetrics.height()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFontMetrics.height()

    i guess for that the best bet u have is boundingRect(QString)...it will give u the height as it is..and it shouldnt affect your program much..its better than to curse Qt whole day ..ciao

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFontMetrics.height()

    Height is basically for the whole string, so its logical for it to be same.
    However, font metrics dont consist of just height, there are also ascent and descent.(QFontMetrics::ascent,QFontMetrics::descent).

    Have a look at them too.

    Also there was som example related to fonts on Qt Labs.. Font Anatomy. I think on SVN, under graphics directory. Have a look at it too, it might help

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.