[Qt-interest] show the needle of the compass

Matthias Pospiech matthias.pospiech at gmx.de
Mon May 4 20:16:01 CEST 2009


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



More information about the Qt-interest-old mailing list