【问题标题】:How to set font style on the first item of a QComboBox?如何在 QComboBox 的第一项上设置字体样式?
【发布时间】:2011-03-28 16:27:55
【问题描述】:

我会在 QComboBox 上设置第一项的字体样式。 我正在使用 Qt 框架。 我该怎么做?

【问题讨论】:

    标签: qt stylesheet qcombobox


    【解决方案1】:

    问题解决了。

    combo.setItemData(rowIndex, QVariant(myCustomFont), Qt.FontRole)
    

    我正在使用 PyQt

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-16
      • 2020-08-02
      • 2012-01-15
      • 1970-01-01
      • 1970-01-01
      • 2012-11-26
      • 2012-09-21
      • 1970-01-01
      相关资源
      最近更新 更多