Results 1 to 20 of 23

Thread: problem with Font changing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: problem with Font changing

    Why dont u just set the stylesheet to the label u want ??

    my_label->setStyleSheet("font:Arial ; font-size: 12px");

  2. #2
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with Font changing

    Quote Originally Posted by aamer4yu View Post
    Why dont u just set the stylesheet to the label u want ??

    my_label->setStyleSheet("font:Arial ; font-size: 12px");
    Thanx aamer. I tried like so, still same problem.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with Font changing

    Hi All
    Now the font is changed. I did like below
    ui.m_label->setStyleSheet("QLabel#m_label1 {background-color: white;"
    "color : black; border: 2px solid black;"
    "font:Arial ; font-size: 20px}");

    But the problem is that two images are coming. one in default font and another in Arial font. So the text is not visible properly. What ll i do to solve this?
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

Similar Threads

  1. Replies: 1
    Last Post: 25th December 2007, 10:35
  2. QMainWindow: problem changing centralWidget
    By Caius Aérobus in forum Qt Programming
    Replies: 6
    Last Post: 4th October 2007, 13:00
  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. Font Problem Porting from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2007, 10:25
  5. Font Problem
    By prakash in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 16:53

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.