How can I set the background color for a part of the background like in the following image:
Of course, without border frames, I want to set only the cyan color.
I need to set the length of the left part (cyan) as the percentage of the widget length, e.g 30%.
If you want it hard-coded in the application, you can overload the
paintEvent
function in a widget. Something like this:With css I would hack qlineargradient a little bit. Note that edge of cyan may be a little blurry.