Results 1 to 8 of 8

Thread: QString text width without <qt><b> and other special params

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    321
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Exclamation QString text width without <qt><b> and other special params

    Hi,
    Is it possible to have the text width without the special params as <qt>, <b> and others ?
    I wrote an Elided QLabel custom class but then the width is not correct, and also I have this case in other places.
    For the simple way I used the remove function of QString to remove <qt>, </qt>, <b> and </b> but there is a way to remove all ? I surely don't know all so I can miss one too.
    BUT also italic and bold change the width of the text, so it has to be parsed, but maybe one function already do that in Qt ?
    Thanks for the help
    Last edited by Alundra; 27th July 2016 at 14:42.

Similar Threads

  1. adding special symbol unicode to qstring
    By wagmare in forum Newbie
    Replies: 2
    Last Post: 1st June 2016, 06:03
  2. QString Special Character Problem
    By hakiim35 in forum Qt Programming
    Replies: 1
    Last Post: 3rd October 2011, 14:38
  3. Text width greater than the QRect
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 31st March 2011, 08:27
  4. Fastest way to get width of rich text
    By jgrauman in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2010, 22:07
  5. maximum text width of interval
    By osiris81 in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2010, 14:37

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.