Such styles are usually applied on application level and not on widgets.
At first you should decide which kind of styling you want use (style sheets or setting styles by code). They can be mixed but it is not recommended. This link may help you with the decision:
https://forum.qt.io/topic/33604/style-sheets-vs-qstyle/4[
^]
When using style sheets, all widgets will inherit the style from their parents (like with CSS styles for HTML). When loading a general style sheet at program start all your widgets will use it.
If you want to use different styles for specific widgets, you can enter them in the
styleSheet
property in the Qt Designer. That will do what you want (save the style in the UI file).