PDA

View Full Version : Generating Dial using Qwt by Qt



Navi
11th June 2015, 08:28
I am able to generate a dial with scale outside the dial using QWT.I need to display the scale inside the dial.How can i display the scale inside the dial using QWT.

And also I need the dial as double layer.

How can i display the dial as double layer.

ChrisW67
11th June 2015, 10:07
The scale is part of the QwtDial (http://qwt.sourceforge.net/class_qwt_dial.html#details), i.e. it is inside the dial widget. What do you mean by "inside the dial"? Are you talking about QwtKnob (http://qwt.sourceforge.net/class_qwt_knob.html#details)? Do you have a picture of what you want?



And also I need the dial as double layer.
How can i display the dial as double layer.

Absolutely no idea what this might mean.

Navi
12th June 2015, 07:40
i have attached an image.i need the dial as same in that image

ChrisW67
12th June 2015, 20:50
What image?

Navi
13th June 2015, 04:15
11204
i have attached an image.i need the dial as same in that image

ChrisW67
13th June 2015, 09:14
So you want the scale to be drawn with the labels closer to the centre of the widget than the scale tick marks.

QwtRoundScaleDraw will only draw the label outside the ticks. I guess that you will have to subclass this class and adjust your version to render differently (drawTick() and drawLabel() probably). The in your QwtDial subclass use that renderer.

Navi
15th June 2015, 05:29
I am a beginner in qwt. so give me an example for drawtick and drawlabel

ChrisW67
15th June 2015, 12:55
I am sorry, but I do not have a couple of hours to scratch your itch for you.

d_stranz
15th June 2015, 18:16
I am a beginner in qwt. so give me an example for drawtick and drawlabel

The source code for Qwt is freely available, so look at the QwtRoundScaleDraw code and see how it draws the ticks and labels. Use your knowledge of high school geometry to reverse the direction of the ticks and then draw the labels at the new ends of the ticks in the class you derive from QwtRoundScaleDraw.