Button with iconSource - how to set size?
-
-
Hi,
The Button size should get adjusted according to the image size.
-
Hmm. Missed the word exactly in your question. Seems it pads some space throughout.
-
Yes the default Button style adds some space. Are you open to using ButtonStyle ? It works.
@
Button {
id: b
style: ButtonStyle {
background: Image {
source: "file:///root/star.png"
}
}
onClicked: { console.log(b.width,b.height) }
}
@