Results 1 to 3 of 3

Thread: What is the default color of Ubuntu text?

  1. #1
    Join Date
    Nov 2010
    Beans
    69

    Thumbs down [Solved] What is the default color of Ubuntu text?

    I am setting a label with this...
    Code:
    ui->imagesLabel_2->setStyleSheet("* { color: white }");
    But if i set it to black it will be different from the other text's default ( which is black-grey )..

    So what is the default color of ubuntu text?

    I am using Qt Creator....
    Last edited by leon.vitanos; January 9th, 2011 at 07:20 PM.

  2. #2
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: What is the default color of Ubuntu text?

    Browsing the documentation, it seems as if you can do what you want by getting the QPalette object for your application (returned by QApplication:: palette()) and reading the text color from it.

    See: http://doc.qt.nokia.com/4.6/qpalette.html#details

  3. #3
    Join Date
    Nov 2010
    Beans
    69

    Re: What is the default color of Ubuntu text?

    Quote Originally Posted by Zugzwang View Post
    Browsing the documentation, it seems as if you can do what you want by getting the QPalette object for your application (returned by QApplication:: palette()) and reading the text color from it.

    See: http://doc.qt.nokia.com/4.6/qpalette.html#details
    I basically had found a solution.. it is something like setStyleSheet(stylesheet);

    Something like that.. i do not remember exactly now.. Anyway thanks..

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
  •