


下斜线是可以设置成功的,为什么斜体和加粗点击却没有用呢?是因为setBold和setItalic函数的原因吗?
查了一下文档,有可能不生效:
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.