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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:39:15+00:00 2026-05-30T02:39:15+00:00

If I call setStyleSheet on a widget (in this case a QToolButton ) it

  • 0

If I call setStyleSheet on a widget (in this case a QToolButton) it no longer updates its font via font propagation from its parent. That is, once the style sheet is set, a call to setFont on some parent widget will no longer alter the font on this widget.

Is this some way to workaround this broken behaviour?

Note: my stylesheet has no font properties specified, thus according to the docs it shouldn’t interfere with the font. (For example: ":checked { border: 1px inset rgba(128,0,0,128); \nbackground-color: rgba( 200, 200, 0, 128 ); }")

Note: I’m also reasonably certain I’m setting the font correctly since all other controls in the application update correctly, only those which have a style-sheet set do not.

  • 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-30T02:39:16+00:00Added an answer on May 30, 2026 at 2:39 am

    Even though the docu on setFont says

    Note: If Qt Style Sheets are used on the same widget as setFont(), style sheets will take precedence if the settings conflict.

    Which in this case should not play a role, internal qt docu in setFont function says

    ### Stylesheet has a different font propagation mechanism. When a stylesheet
    is applied, fonts are not propagated anymore

    So at the end of the day I would always set the parent font first and than apply stylesheets to children

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

Sidebar

Related Questions

I call a template like this from my view: return render_to_response('mytemplate.html', context_instance=RequestContext(request)) I'm trying
A call from a Silverlight 2.0 control to a WebService, returned via MyWebServiceNameEventArgs is
Call this from a QWidget: Parser->xmlParser(_layout, xmlPath, comingFrom, mapCount); , but get two No
I call a function from a function in C++ that has the line getline(cin,name)
I call the same controller many times from _Layout.cshtml view. So in this controller,
I call a javascript function from a textbox by using OnKeyPress=clickSearchButton() Here is my
I call this a flash meeting, but maybe there is another more appropriate name.
I call addNotify() method in class that I posted here. The problem is, that
I call a certain div from another page with jquery to be loaded into
A call to getLocationOnScreen() or getLocationInWindow() both give me a top/Y coordinate that is

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.