How to change QPushButton icon size using stylesheets in Qt app
Asked Answered
C

2

7

Is it possible to set and change the icon size on a QPushButton using stylesheets? I need this for a qt based template that customers stylize using stylesheets.

Carnot answered 24/5, 2016 at 12:25 Comment(0)
C
18

Use the following code in stylesheet:

qproperty-iconSize: 24px;

Carnot answered 24/5, 2016 at 12:25 Comment(1)
It's better to use the normal CSS property: icon-size: 24px;.Ic
C
0

You could do:

qproperty-icon: url(":/img/favourit.png");
qproperty-iconSize: 14px;
Crews answered 30/4, 2023 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.