下斜线是可以设置成功的,为什么斜体和加粗点击却没有用呢?是因为setBold和setItalic函数的原因吗?
2条回答 默认 最新
- Cynhard85 2022-04-27 17:50关注
查了一下文档,有可能不生效:
void QFont::setBold(bool enable)
If enable is true sets the font's weight to QFont::Bold; otherwise sets the weight to QFont::Normal.
For finer boldness control use setWeight().
Note: If styleName() is set, this value may be ignored, or if supported on the platform, the font artificially embolded.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 2无用