hi, I want to add new needle for qwtDial because I need to show two needle in qwtDial but setNeedle method takes one needle .How can I do that.
hi, I want to add new needle for qwtDial because I need to show two needle in qwtDial but setNeedle method takes one needle .How can I do that.
You have to derive from QwtDial and implement the second needle feature.
What exactly needs to be done depends on what you want to do with the second needle. If it is only about displaying a value it might be enough to do it in YourDial::drawContents.
Uwe
Copy the code in QwtDial::drawContents, that deals with calculating the parameters of the drawNeedle call. Then add this code like this:
Qt Code:
virtual void YourDial::drawContents(...) { // now calculate the parameters for your second // needle ... drawNeedle(...); }To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks