[Qt-interest] show the needle of the compass

Stefanos Antaris santaris at csd.auth.gr
Mon May 4 20:33:59 CEST 2009


Matthias Pospiech wrote:
> Stefanos Antaris schrieb:
>> Hello.I try to make a compass.I didn't manage to install the qwt 
>> libraries on my Mac so i just took all the header files and the cpp 
>> files and i put them into my qt application.So i have made a 
>> QwtCompass and i can't show the needle of the compass.Can anyone help 
>> me?I have made an QwtCompass object but i don't know what do i have 
>> to do next.Moreover can i change the needle size?
>>   
> As far as I understand you, you have enabled qwt by included the whole 
> code in your application and you do not need
> to integrate the libary. Then everything which qwt allows should work.
> If you want to change the apperiance, have you looked into the dials 
> example and looked into the documentation of the used classes?
>
> I have not looked into the code, but the documentation has function 
> like this one:
>
> void QwtDialSimpleNeedle::drawArrowNeedle      (
>        QPainter *        painter,
>        const QPalette &      palette,
>        QPalette::ColorGroup      colorGroup,
>        const QPoint &      center,
>        int      length,
>        int      width,
>        double      direction,
>        bool      hasKnob        )   
>
> hope that helps.
>
> Matthias
>
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.



More information about the Qt-interest-old mailing list