I would to set the font style of first item on a QComboBox. I'm using the Qt framework. How can I do that?

有帮助吗?

解决方案

Problem solved.

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

I'm using PyQt

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top