[kde-edu]: Need help with this code

Carsten Niehaus cniehaus at gmx.de
Mon Jul 11 16:02:23 CEST 2005


I am drawing a vertical line and then want to put a string below that line....

      p->drawLine( x,0,x, m_realHeight );
      p->save();
      p->rotate( -90.0 );
      p->translate( m_realHeight,0 );
   
      p->drawText( -m_realHeight,x, "test" );
   
      p->restore();

I tried all kinds of "translations" but it never works. The Qt-API is not 
exactly verbose for QPainter::translate().
I am sure that there is only a missing "-" or something like that but I simple 
don't get it. I attached the comple file, you will find this code in 

void SpectrumWidget::drawLines( QPainter *p )

Can anyone help?

Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spectrum.cpp
Type: text/x-c++src
Size: 2997 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-edu/attachments/20050711/276f4373/spectrum.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-edu/attachments/20050711/276f4373/attachment.pgp


More information about the kde-edu mailing list