PDA

View Full Version : Font size of lcdnumber does not change



Niamita
27th January 2012, 07:55
Hi all
I am changing the font size of lcdnumber but it is not changing. i am using code


QFont font_date_time("Verdana", 18);
font_date_time.setBold(true);
font_date_time.setItalic(true);

lcd->setFont(font_date_time);and when i am trying to change its textcolor it is not working if i pass rgb value but if i am giving qt default color it is working fine.


lcd->setAutoFillBackground(true);// see the different if you comment that line out.
QPalette Pal = lcd->palette();
Pal.setColor(QPalette::Normal, QPalette::WindowText, Qt::greeen); //it is working
//Pal.setColor(QPalette::Normal, QPalette::WindowText, QColor(200,1,140)); //it is not working
lcd->setPalette(Pal);