hello,
I'm wondering how I should setup a QLinearGradient to fill the liquid in a QwtThermo widget.
For example:
what values I should write instead of a, b, c, d to cover the whole liquid rectangle?
Thanks!
Marco
Printable View
hello,
I'm wondering how I should setup a QLinearGradient to fill the liquid in a QwtThermo widget.
For example:
what values I should write instead of a, b, c, d to cover the whole liquid rectangle?
Thanks!
Marco
I'm afraid, that there is no solution without patching Qwt.
a) The rectangle for the liquid is calculated in layoutThermo what needs to become virtual so, that you could overload it.
b) You need to introduce a method, that calculates the fill rectangle ( like it is done in drawThermo() ).
Then you could adjust your brush at the end of YourThermo::layoutThermo after calling layoutThermo of the base class according to the fill rectangle.
Uwe
PS: Unfortunately almost all development in the last years was for the plot framework only and the other widgets were never updated to many new features of Qt4. Hope I will find some the time when Qt 6 is out.
I don't know if it's the right way but I've just found a solution:
the rectangle (0, 0) (1, 1) now cover the whole liquid surface if I'm not wrong. Actually, I'm using an horizontal linear gradient so it starts from (0, 0) and goes up to (0.75, 0).
Marco
ps. I'm customizing a lot of instrumentation gauges because most of them are incomplete or miss some common features.
Do you know if there is a *complete* suite of gauges for QT (no problem if payware)? Something like Dundas Gauge for .NET or similar?