Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Material color effect button
Forum Updated to NodeBB v4.3 + New Features

Material color effect button

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 619 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DjeffD Offline
    DjeffD Offline
    Djeff
    wrote on last edited by Djeff
    #1

    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

    1 Reply Last reply
    0
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2

      Something like this?

      Button {
          text: "Button"
          Material.foreground: pressed ? "white" : Material.Purple
          Material.background: pressed ? Material.Purple : "transparent"
      }
      
      1 Reply Last reply
      1
      • DjeffD Offline
        DjeffD Offline
        Djeff
        wrote on last edited by
        #3

        That's i was looking for. Thank you !

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved