-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qcollapsible font size / style #231
Comments
Hey @carsen-stringer, looks like that hasn't been exposed fully. I'll give you a workaround that uses a private attribute, and we'll have to fix it with a PR. The main text that you see in a So, as a workaround, you could use: wdg = QCollapsible('toggle me')
font = wdg.font()
# modify the font
wdg._toggle_btn.setFont(font) |
it's also perhaps worth nothing that that only adjust the top level text, but not widgets you've added inside. So, another option that doesn't require private attribute access, and which controls all of them: # where wdg is a QCollapsible
for child in wdg.children():
if isinstance(child, QWidget):
child.setFont(font) |
thanks so much! adding it to my code now
…On Wed, Feb 14, 2024 at 1:48 PM Talley Lambert ***@***.***> wrote:
it's also perhaps worth nothing that that only adjust the top level text,
but not widgets you've added inside. So, another option that doesn't
require private attribute access, and which controls all of them:
for child in wdg.children():
if isinstance(child, QWidget):
child.setFont(font)
—
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADS6TFJKSVTHJIO5C5KPB7LYTUBHNAVCNFSM6AAAAABDFXRCXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGQYDGMBYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Love the QCollapsible class! (and the rangeslider!) I tried using "setFont" with QCollapsible and couldn't change the font style for the title (like you can for a
QGroupBox
). Is it possible in a different way? Thanks.The text was updated successfully, but these errors were encountered: