设置字体大小使用QFont 的setPontSize

QLabel *lb    = new QLabel(tr("examp"));
QFont ft;
ft.setPointSize(14);
lb->setFont(ft);

设置颜色使用QPalette

QLabel *lb    = new QLabel(tr("examp"));
QPalette pa;
pa.setColor(QPalette::WindowText,Qt::red);
lb->setPalette(pa);

 

相关文章: