Results 1 to 2 of 2

Thread: change the text colour in Menubar

  1. #1
    Join Date
    Feb 2010
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default change the text colour in Menubar

    Hi ,

    I want to change the text colour in the menubar to white but unable to do so. I am using stylesheets but not able to do so . My source code is below , please sujjest if something is wrong.

    menuBar = new QMenuBar;
    menuBar->setFixedHeight(24);
    QString ss("background-color: black; colour:black;" \
    "QMenuBar::item { background: black; colour: black }");
    menuBar->setStyleSheet(ss);

    fileMenu = new QMenu(tr("&File"), this);
    exitAction = fileMenu->addAction(tr("E&xit"));
    menuBar->addMenu(fileMenu);

    Please give a source code or correct the above

  2. #2
    Join Date
    May 2010
    Posts
    24
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: change the text colour in Menubar

    The name of the property is color not colour, so it's "color: white".

Similar Threads

  1. Change QTableView border colour under special cicrumstances
    By stefanadelbert in forum Qt Programming
    Replies: 0
    Last Post: 12th April 2010, 07:52
  2. tablewidget text colour
    By hollowhead in forum Newbie
    Replies: 12
    Last Post: 12th March 2010, 15:59
  3. How to change Label text colour in Qt designer
    By sudhansu in forum Qt Programming
    Replies: 2
    Last Post: 6th January 2010, 13:31
  4. How to change Text colour in EditText?
    By phillip_Qt in forum Qt Programming
    Replies: 6
    Last Post: 6th March 2008, 09:48
  5. Change colour of QString
    By Morea in forum Newbie
    Replies: 9
    Last Post: 10th February 2006, 23:31

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.