Results 1 to 3 of 3

Thread: Change font color of whole application

  1. #1
    Join Date
    Dec 2011
    Posts
    11
    Platforms
    Unix/X11

    Default Change font color of whole application

    Hello, i want to change the color of the font of my whole application, how can i do this?

    Thanks

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Change font color of whole application

    Qt Code:
    1. QPalette p = QApplication::palette();
    2. p.setColor( QPalette::Text, Qt::red );
    3. p.setColor( QPalette::WindowText, Qt::red );
    4. p.setColor( QPalette::ButtonText, Qt::red );
    5. p.setColor( QPalette::BrightText, Qt::red );
    6. QApplication::setPalette( p );
    To copy to clipboard, switch view to plain text mode 

  3. #3
    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: Change font color of whole application

    Or using stylesheet -

    qApp->setStyleSheet("color:red");

Similar Threads

  1. Change font color of QListView row
    By Phlucious in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2012, 19:42
  2. Replies: 6
    Last Post: 5th August 2009, 11:40
  3. Change Font of QListWidget to Monospace Font
    By pospiech in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2008, 19:23
  4. How do I change the font color in QTextBrowser?
    By probine in forum Qt Programming
    Replies: 2
    Last Post: 29th November 2006, 13:08
  5. Change Font Color of Label and CheckBox
    By mahe2310 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 15th June 2006, 11:24

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.