PDA

View Full Version : Is it possible to add QPen property and stylize it using qss?



KalinH
21st May 2018, 09:46
I'm trying to set color and width to QPen using qss.
I've added a QPen property like below

Q_PROPERTY( QPen hoveredContentBorder READ hoveredContentBorder WRITE setHoveredContentBorder NOTIFY hoveredContentBorderChanged )
It doesn't work.

I also added QBrush property like below and it's working fine.

Q_PROPERTY( QBrush hoveredContentFill READ hoveredContentFill WRITE setHoveredContentFill NOTIFY hoveredContentFillChanged )

I'm using Qt 5.10.1.
Thanks in advance.

Ginsengelf
22nd May 2018, 07:52
Hi, what doesn't work? What did you do the QPen? What did you expect?

Ginsengelf