Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Sharing]Create MultiColoured Radial PushButton

[Sharing]Create MultiColoured Radial PushButton

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 874 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.
  • D Offline
    D Offline
    dreamerindia
    wrote on last edited by
    #1

    Dear Friends,
    Add this code to your QPushButton Stylesheet and you will get Radial Multi coloured PushButton.Modify the colours you want and have a native look.

    @QPushButton{ color: rgb(0, 0, 127); background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(0, 0, 0, 0), stop:0.52 rgba(0, 0, 0, 0), stop:0.565 rgba(82, 121, 76, 33), stop:0.65 rgba(159, 235, 148, 64), stop:0.721925 rgba(255, 238, 150, 129), stop:0.77 rgba(255, 128, 128, 204), stop:0.89 rgba(191, 128, 255, 64), stop:1 rgba(0, 0, 0, 0)); font: 18px "Dejavu Sans"; border:2px; }
    QPushButton:pressed { color: rgb(0, 0, 127); background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(255,255,255,255), stop:0.52 rgba(255, 255, 255, 200), stop:0.565 rgba(0, 0, 0, 255), stop:0.65 rgba(199, 255, 198, 104), stop:0.721925 rgba(255, 255, 190, 169), stop:0.77 rgba(255, 168, 168, 224), stop:0.89 rgba(201, 148, 255, 84), stop:1 rgba(0, 0, 0, 0)); font: 22px "Dejavu Sans"; border:4px; }@

    ~Ravivarman~

    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