Results 1 to 2 of 2

Thread: QComboBox text color problem with CSS

  1. #1

    Default QComboBox text color problem with CSS

    We want to fix the text color of a combobox with a css stylesheet but it do not works

    QComboBox{font-family:Italic;font-size:52px;font-color:white;background:#fff; border-color:#a1c60e;border-width:4px;border-style:solid;border-radius:8px 8px 8px 8px;}

    The text appears in black ...

    Thanks in advance

    Sergio

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QComboBox text color problem with CSS

    Where did you see in the docs the property: 'font-color'?
    Try this instead:
    http://qt-project.org/doc/qt-4.8/sty...ml#paletterole
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Highlight an item in QCombobox by text color
    By AlekseyK in forum Qt Programming
    Replies: 6
    Last Post: 18th March 2019, 22:31
  2. Replies: 4
    Last Post: 8th September 2011, 09:22
  3. QComboBox - style sheet set text color non focus?
    By alan in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2011, 00:31
  4. Replies: 3
    Last Post: 22nd January 2010, 17:46
  5. qtcreator text editor color scheme problem
    By elflord in forum Qt Tools
    Replies: 1
    Last Post: 5th March 2009, 18:42

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.