Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6223745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:32:33+00:00 2026-05-24T08:32:33+00:00

I need to know if it is at all possible to set a background

  • 0

I need to know if it is at all possible to set a background color with an overlapping gradient on a QPushButton. I’ve created a round button with an SVG image as it’s icon (which is just a white image showing an exclamation mark and a white border). I need the background of the button to be black, and when toggled I need it to display a radial gradient over the black background. The situation I have now just replaces the black background with the gradient:

enter image description here

The stylesheet I use is as follows:

QPushButton{
    background: black;
    border-radius: 25;
    border-color: gray;
}

#alertButton::checked{
    background-color: qradialgradient(cx: 0.5, cy: 0.5, radius: 2, fx: 0.5, fy: 1, stop: 0 rgba(255,30,30,255), stop: 0.2 rgba(255,30,30,144), stop: 0.4 rgba(255,30,30,32));
}

So, would it be possible to place the gradient over the black background, instead of it replacing it? If possible by doing this in the stylesheet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:32:35+00:00Added an answer on May 24, 2026 at 8:32 am

    You could just adapt the gradient to go from the gradient’s color to the background color to have the same effect. So instead of going from red to white, go from red to black.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need an algorithm that identifies all possible combinations of a set of numbers
We all know that RAW pointers need to be wrapped in some form of
I need to know how much space occupies all the databases inside an SQL
I know that to find all the .h files I need to use: find
I need to write a module that gives me a page will all possible
I need to generate a Deterministic Finite Automata (DFA), selected from all possible DFAs
I need to know about Epoll On linux System. Could you recommend manual or
I need to know how the performance of different XML tools (parsers, validators, XPath
I need to know how to turn on Code Coverage when running TFS builds
I need to know when the memory will be allocated for a particular program.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.