QT QLabel设置字体的颜色

第一种,使用setPalette()方法以下:c++ QLabel *label = new QLabel(tr("Hello Qt!")); QPalette pe; pe.setColor(QPalette::WindowText,Qt::white); label->setPalette(pe); 第二种,使用样式表以下:web setStyleSheet("colo
相关文章
相关标签/搜索