Qt QSS questions: Is it possible to change the level of transparency of a sidebar dynamically?

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Qt QSS questions: Is it possible to change the level of transparency of a sidebar dynamically?

Post by Kunda1 »

Wondering if it's possible to control the level of transparency of a sidebar depending on whether a drawing/techdraw is open?
Techdraw documents are traditionally white and sometime that clashes with the fonts in a sidebar that has a level of transparency in it. Here's an example:
https://github.com/StudioPetrikas/FreeC ... I/issues/3

Anyone have an idea?

Edit:
This is referencing the RT's Link branch feature 'overlay' but nevertheless, this is more a question about QSS then it is about that.

Edit2: Has anyone else noticed how much it sucks to search for QSS help online. I've very rarely found answers trying to go down the QSS rabbit hole.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

Re: Qt QSS questions: Is it possible to change the level of transparency of a sidebar dynamically?

Post by turn211 »

background-color could be set using rgba and the alpha channel could be made more transparent, with something like

Code: Select all

setStyleSheet("background-color: rgba(255, 255, 255, 10);");
255 being opaque and 0 being fully transparent. Just spitballing. Cheers
Post Reply