Re: QwtDial.setOrigin() issue
I create a custom QwtCustomDial wich inherits from QwtDial and I want to change the origin.
In the constructor of my custom dial I call setOrigin() with different values 0.0, 180.0 and 270.0 but nothig changes in the appearance of the dial.
It seems that the dafault origin of 90.0 is not modified.
Is there someting wrong in my approach?
Added after 35 minutes:
I investigated a little bit deeper and I found that the scale changes when I change the origin.
The problem is in the position where I draw the needle, but probably the draw() for the needle must be manually customized if I change the origin.
Added after 24 minutes:
Yes, problem fixed customizing properly draw() for thew needle.
As per documentation, it uses the parameter 'directio' which is "Direction of the needle, in degrees counter clockwise"
Re: QwtDial.setOrigin() issue
Quote:
Originally Posted by
vix
The problem is in the position where I draw the needle, but probably the draw() for the needle must be manually customized if I change the origin.
Without knowing about your draw method - hard to say. But I would expect ( without checking it ), that the direction parameter of QwtDial::drawNeedle points to where the value on the corresponding scale is - in terms of a unit circle.
Uwe