[Qt-interest] show the needle of the compass

Stefanos Antaris santaris at csd.auth.gr
Tue May 5 10:52:59 CEST 2009


Matthias Pospiech wrote:
> Stefanos Antaris schrieb:
>> I tried to install the qwt libraries on my Mac and i didn't manage 
>> it.So i took the code of qwt and i put it into my qt application in 
>> order to use it.Ok.I found this function too.But i don't know which 
>> parameteres should i pass.Which painter,palette,etc.This is my problem.
> It took a look into the code of the dials example and there all 
> needles are created using setNeedle
>
> compass->setNeedle(new QwtDialSimpleNeedle(QwtDialSimpleNeedle::Ray,
>                false, Qt::white));
>
> Looking into the docs of QwtDialSimpleNeedle 
> (http://qwt.sourceforge.net/class_qwt_dial_simple_needle.html) I find 
> a member function setWidth.
> That is probably what you need.
>
> Not tested though,
> Matthias
>
Ok i made it.But the whole compass is just too small.And as i see on the 
qwt_compass.h code there is nowhere to change the size of the 
compass.Moreover the needle of the compass moves only when the mouse is 
clicked.And i can't make it to rotate with a variable.I mean something 
like rotate(59);Is there any function or i have to make one?



More information about the Qt-interest-old mailing list