Qt World Summit: Submit your Presentation

Material color effect button

  • Hello,

    I'm currently using the material style to develop an app, and i would like to know how can I change the color's button to another color when i click on it with the same effect as Material.

    The only thing i got now that it get darker from the same color and i would like to have this effect from transparent to highlight, does it possible ?

    Thank you

  • Something like this?

    Button {
        text: "Button"
        Material.foreground: pressed ? "white" : Material.Purple
        Material.background: pressed ? Material.Purple : "transparent"

  • That's i was looking for. Thank you !

Log in to reply