Results 1 to 3 of 3

Thread: Changing text colour of QLineEdit qss file

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

    Default Changing text colour of QLineEdit qss file

    Hi All.
    I need u guys help.
    I've a Line edit. whose background color is black. I need the the text color to be white, when i'll write some thing. I need to change through qss file. Here is the code of my qss file.
    QLineEdit
    {
    background-color: Black;
    border: 1px solid black;
    }

    Can any body plz tell me what to add.

    Advancely Thanx 4 Help.
    Cheers,
    Phillip



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

  2. #2
    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: Changing text colour of QLineEdit qss file

    Cant you use color:your_color in the Stylesheet ??
    like
    QLineEdit
    {
    color : red;
    background-color: Black;
    border: 1px solid black;
    }

  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: Changing text colour of QLineEdit qss file

    Quote Originally Posted by aamer4yu View Post
    Cant you use color:your_color in the Stylesheet ??
    like


    Thank you very much. Its working now.
    Cheers,
    Phillip



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

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Changing colour thru qss file
    By phillip_Qt in forum Qt Programming
    Replies: 3
    Last Post: 27th March 2008, 05:36
  3. QValidator, regular expressions and QLineEdit
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 01:25
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.