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 8921179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:28:27+00:00 2026-06-15T06:28:27+00:00

How can I customize the look of a QPushButton or QToolButton to look something

  • 0

How can I customize the look of a QPushButton or QToolButton to look something like elementaryos’s webpage “buttons”?

Button images

All I really want is the characteristic image position and the text on it’s side, maybe if i’m lucky i can also get a border like that, but i don’t really need the little description below the title 🙂
Can i do it only with StyleSheets, or do i have to subclass QPushButton/QAbstractButton/Something like that? I already searched everywhere but didn’t found that level of customization without things like painting something in a fixed place, which is exactly what i don’t want.

EDIT:
I really would like a solution that would get me a customizable button, not a fixed image one, something in the tracks of

MainWindowButton(QString(title), /*opt*/QString(description), QImage(icon));
  • 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-06-15T06:28:28+00:00Added an answer on June 15, 2026 at 6:28 am

    There are a number of approaches that may work.

    You might first consider trying to compose a solution with a normal QPushButton with a QVBoxLayout on it. You could add three QLabels; one for the title text, one for the caption text and one for the image. Some CSS could probably be used to render the background image of the button for up and down and more CSS to style the text in the two labels and position the image on the third but you would then find that the labels don’t shift down when the button is clicked.

    I think the best solution involves direct painting. You could do this by sub classing a QWidget and overriding the paintEvent(). Render everything for the up state and shift everything over and down a bit for the down state.

    You could achieve this without sub classing by rendering the up and down states to a QImage and styling a QPushbutton with them using CSS.

    There are a number of combinations of these approaches too.

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

Sidebar

Related Questions

Hello I want to customize the calendar. The Calendar look like monthly calendar. How
I want to have a flexible templating language that I can customize for a
How to customize KNPMenuBundle? I can't figure out how to add an image or
I want to customize a .NET build process so that I can run an
I have installed Wix 3.5 and i want to customize some dialogs, where can
Take a look on attachement, how can I customize the check boxes in Sencha
I'd like to customize the look of JPopupMenu so i made a custom class
I want to customize the look of a TextBlock . (I want a rounded
I am developing an app which uses tabs. I want to customize tab look.I
To customize the visual look of a UISlider you can set the thumb and

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.