setStyleSheet(“color:red;”);
setStyleSheet(“color:#ff6600;”);

QFont font ( “Microsoft YaHei”, 10, 75); //第一个属性是字体(微软雅黑),第二个是大小,第三个是加粗(权重是75)
ui->label->setFont(font);
常见权重
QFont::Light - 25 高亮
QFont::Normal - 50 正常
QFont::DemiBold - 63 半粗体
QFont::Bold - 75 粗体
QFont::Black - 87 黑体QLabel

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2021-09-14
  • 2021-12-13
  • 2021-10-05
  • 2022-12-23
相关资源
相似解决方案