Results 1 to 5 of 5

Thread: QLabel Font size is not changing???

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QLabel Font size is not changing???

    QLabel Font is not changing??? both in design and code mode.. Please help me...

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QLabel Font size is not changing???

    Sorry, my crystal ball is out for servicing today.

    What have you tried? What did it do? What were you expecting it to do?

  3. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QLabel Font size is not changing???

    hi, hav u tried the following?
    Qt Code:
    1. QFont font;
    2. font.setFamily(QString::fromUtf8("DejaVu Sans"));
    3. font.setPointSize(11);
    4. font.setBold(true);
    5. font.setWeight(75);
    6. label->setFont(font);
    To copy to clipboard, switch view to plain text mode 
    hope it helps,
    Bala

  4. #4
    Join Date
    Mar 2011
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QLabel Font size is not changing???

    Try

    Qt Code:
    1. lable->setStyleSheet("font-size: 15px;");
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QLabel Font size is not changing???

    Qt Code:
    1. font.setPointSize(11);
    To copy to clipboard, switch view to plain text mode 
    works fine.. Thank YOU

Similar Threads

  1. dynamically chaging font depending on resolution..
    By Neeraj19 in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2008, 11:09
  2. Replies: 1
    Last Post: 2nd August 2008, 15:46
  3. adjust font size to QLabel-size
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 9th July 2008, 14:33
  4. 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
  5. QLabel, large, rich text, font size
    By TheKedge in forum Qt Programming
    Replies: 3
    Last Post: 5th February 2007, 11:56

Tags for this Thread

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.