PDA

View Full Version : QwtAnalogClock without label



QTim
7th May 2015, 10:10
Hey Uwe,

right now I try to implement a QwtAnalogClock and i don't want to have the labels (numbers 12, 1, 2, 3, 4,...).

Further I would like to change the colors of the hands.

Thank you very much!

Greetings
QTim

QTim
8th May 2015, 13:47
nevermind, found it by myself


mClock = new QwtAnalogClock(this);
mClock->hand(QwtAnalogClock::HourHand)->setPalette(QPalette(QColor(213,223,229)));
mClock->hand(QwtAnalogClock::MinuteHand)->setPalette(QPalette(QColor(213,223,229)));
mClock->hand(QwtAnalogClock::SecondHand)->setPalette(QPalette(QColor(255,0,0)));
mClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels , false);

Greetz
QTim

Sheetha29
14th March 2019, 11:21
Hello Uwe,
I would like to remove the labels from the Analog Clock .

My Qt Code:
ui->AnalogClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels,false );

Gives this error :
error: invalid use of incomplete type 'class QwtRoundScaleDraw'
ui->AnalogClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels,false );

In Qwtdial.h

QwtRoundScaleDraw *scaleDraw();
const QwtRoundScaleDraw *scaleDraw() const;

Could you please help.

Thanks
Sheethal


^~

Uwe
14th March 2019, 12:06
#include <qwt_round_scale_draw.h>

Uwe