Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: problem with Font changing

  1. #21
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with Font changing

    So maybe qss file overrides stylesheets used in code.

    try different variations of qss file
    i.e:
    font : Arial
    font-size: 12px

    Maybe it's just a matter of invalid
    font : Arial 12x;
    entry is stylesheet that is applied after other.
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

  2. #22
    Join Date
    Oct 2007
    Location
    Cracow
    Posts
    56
    Thanks
    1
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with Font changing

    try it:
    in .qss:
    Qt Code:
    1. font-family: Verdana;
    2. font-size: 16px;
    3. }
    To copy to clipboard, switch view to plain text mode 

    and in your code insert this:
    Qt Code:
    1. your_label->setStyleSheet( "font-family: Arial; font-size : 12px;");
    To copy to clipboard, switch view to plain text mode 

  3. #23
    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, 11:35
  2. QMainWindow: problem changing centralWidget
    By Caius Aérobus in forum Qt Programming
    Replies: 6
    Last Post: 4th October 2007, 14: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, 09:36
  4. Font Problem Porting from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2007, 11:25
  5. Font Problem
    By prakash in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 17: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.