Results 1 to 3 of 3

Thread: changing letter spacing in QLabel

  1. #1
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default changing letter spacing in QLabel

    Hi all,

    I need to change the letter spacing of the text I have entered in QLabel in Qt Designer. I tried using the 'letter-spacing:2px' in CSS of QLabel but it doesn't change anything. Any idea how to do this ?

    -Charvi.

  2. #2
    Join Date
    Sep 2012
    Location
    Iran, Tehran
    Posts
    76
    Thanks
    17
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: changing letter spacing in QLabel

    I don't know what version of Qt you are using but I can't find this property in Qt's (4.7, 4.8) doc and it results in erros (Qt 4.7) if try to use it. You can probably use QFont::setLetterSpacing and QWidget::setFont if you are not forced to use stylesheets.

  3. #3
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: changing letter spacing in QLabel

    Hi ashkan_s, thanks for your answer.

    Need to do it through style sheets. any ideas ?

Similar Threads

  1. QLabel Font size is not changing???
    By Gokulnathvc in forum Newbie
    Replies: 4
    Last Post: 22nd March 2011, 11:17
  2. Changing Opacity in Qlabel
    By desch in forum Qt Programming
    Replies: 6
    Last Post: 3rd December 2007, 14:19
  3. changing QLabel font size(label created on the graphicsView)
    By maverick_pol in forum Qt Programming
    Replies: 11
    Last Post: 17th August 2007, 08:36
  4. Dynamically changing QLabel background colour
    By T4ng10r in forum Qt Programming
    Replies: 19
    Last Post: 19th April 2007, 12:47
  5. adjust Letter Spacing
    By niko in forum Newbie
    Replies: 3
    Last Post: 16th August 2006, 10:05

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.