Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What happened to "Qt:TextWordBreak"?
Forum Updated to NodeBB v4.3 + New Features

What happened to "Qt:TextWordBreak"?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ronM71
    wrote on 24 Mar 2011, 19:52 last edited by
    #1

    It's in the documentation, but codewise, seems like it doesn't exist.

    I am trying to use "MyLabel->fontMetrics().size" to find out the size of a certain text in a label. the label is multi-line with word wrapping. I'd like to find out the size (mainly height) of the outcome text in the current font.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on 24 Mar 2011, 20:25 last edited by
      #2

      Hi ronM71,

      it works in general, but with QFontMetrics::size(), it has no bounding rect...
      Try out QFontMetrics::boundingRect...

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ronM71
        wrote on 24 Mar 2011, 20:53 last edited by
        #3

        Thanks, that did the job along with "Qt::TextWordWrap"

        1 Reply Last reply
        0

        1/3

        24 Mar 2011, 19:52

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved