想开发游戏的Wang 2022-04-27 16:20 采纳率: 90%
浏览 88
已结题

为什么Qt信号与槽设置斜体失败?

img

img

img

下斜线是可以设置成功的,为什么斜体和加粗点击却没有用呢?是因为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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 5月5日
  • 已采纳回答 4月27日
  • 创建了问题 4月27日