manuelschneid3r
15th April 2015, 18:29
I have custom listview items in my QListView, which are drawed by a QStyledItemDelegate. They contain two lines of text which should be both customizable with stylesheets. The first is set by
#list {font: 26px "Ubuntu";}, which works fine. But the second should be stylable as well. Qt [mentions][1] that any designable Q_PROPERTY can be set by the stylesheet, but I wonder where to define and how to access these properties from the QStyledItemDelegate::paint method.
[1]: http://qt-project.org/doc/qt-4.8/stylesheet-syntax.html#setting-qobject-properties
#list {font: 26px "Ubuntu";}, which works fine. But the second should be stylable as well. Qt [mentions][1] that any designable Q_PROPERTY can be set by the stylesheet, but I wonder where to define and how to access these properties from the QStyledItemDelegate::paint method.
[1]: http://qt-project.org/doc/qt-4.8/stylesheet-syntax.html#setting-qobject-properties