Hi All,
I am struggling to put a label onto a QwtDial. Ideally I would like to have both the units inside the dial and then a separate label outside saying what the dial is showing. Is this possible? I have searched for quite a while though I have very little experience with GUIs so I maybe missing something obvious!
At the minute I have made a simple function that returns a dial object. Can anyone help with what to add to insert the labels I want?
EDIT: I am using Python
def create_dials(self, name, unit):
dial = Qwt.QwtDial()
dial.setWrapping(False)
dial.setReadOnly(True)
dial.setFixedSize(150,150)
dial.setOrigin(135.0)
dial.setScaleArc(0.0, 270.0)
dial.setRange(0.0, 240.0)
dial.setScale(-1, 2, 20)
dial.setNeedle(Qwt.QwtDialSimpleNeedle(
Qwt.QwtDialSimpleNeedle.Arrow,
True,
QColor(Qt.red),
QColor(Qt.gray).light(130)))
dial.setScaleOptions(Qwt.QwtDial.ScaleTicks | Qwt.QwtDial.ScaleLabel )
dial.setScaleTicks(0, 4, 8)
return dial
Bookmarks