设置字体大小使用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);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-01-18
相关资源
相似解决方案