Set CSS inside a .Qss file for buttons generated in code and populated inside a QFrame
-
So i have a .Qss file with my entire theme / color scheme for my App
and i have a QFrame#DeviceListMenu that in code gets populated with buttons?
how can i style these inside my .Qss file with css?
The reason im asking this is i have 2 themes (2 .Qss) files that i can switch between and i want to keep ALL css inside the .Qss files
-
@Kris-Revi said in Set CSS inside a .Qss file for buttons generated in code and populated inside a QFrame:
as buttons in this QFrame can be deleted and /or added
Then I would concentrate on getting the first approach to work. I would start with, say,
QFrame#DeviceListMenu { background-color: red; }
till you are sure that is affecting the menu, then progress from there to see how to address whatever your "buttons" are. -
Hi,
You can also make use of a dynamic property as shown here. That way you can simply mark your buttons and they should get their style applied.