use of colors/palettes/stylesheets

I've been asked to add some color to my app, and am trying to understand how to do this.

Do I understand correctly that I should be using the palette property of the QWidget object, rather than trying to control colors on individual items?

as an example, how do I set the color of my main widget (ie, the background)?

our existing UI shows buttons. The color of the buttons changes when hovered over, and changes again when pressed. Is this also handled through the palette? I can't find anything on this other than manually using signals to change the color, which seems a little extreme.

@kshegunov I'm developing on Windows 10, but any solution needs to work across platforms. Does this mean I need to use stylesheets? Somehow, I had assumed that Qt would give me a little more control over this.

@mzimmers
If you want just colors - palette will work most of the time , at least for desktop systems,
but you will have to test application on the system you want to support anyway.

Stylesheets give additional controls (shapes, positioning, metc ) , but not all widgets and aspects can be customized.
And this likely will not be ever fixed - due QWidget development status.
In this case you will need customize QWidgets painting for the affected widgets.

Warning! Palettes and stylesheet do not play together well, choose one or go QML and define everything yourself.

Style sheets let you perform all kinds of customizations that are difficult or impossible to perform using QPalette alone. If you want yellow backgrounds for mandatory fields, red text for potentially destructive push buttons, or fancy check boxes, style sheets are the answer.