[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    why doesn't this code paint on screen like it should?
From:       Mathias Homann <Mathias.Homann () eregion ! de>
Date:       2004-09-26 8:44:40
Message-ID: 200409261044.42568.Mathias.Homann () eregion ! de
[Download RAW message or body]

Hi,


i can't see why this code doesnt draw in my window...
of course it is compiled with DEBUG defined, i see the cout << happen 
in konsole.


any hints?


bye,
	MH


void kannasaver::draw_kana()
{
    /// @todo implement me
    QWidget *mywidget = qApp->mainWidget();
    QPainter paint;
    paint.begin(this);
    
    int mywidth = mywidget->rect().width();
    int myheight = mywidget->rect().height();

    setBackgroundColor( QColor(black)  );
    erase();
    paint.setClipping(false);
    
    paint.setPen( Qt::white );
#ifdef DEBUG
    paint.drawText( 10,10, (const QString)"test", -1, QPainter::Auto);
    cout << "Breite: " << mywidth << "; Höhe: " << myheight << endl;
#endif
}

-- 
Die unaufgeforderte Zusendung einer Werbemail an Privatleute verstößt 
gegen  §1 UWG und 823 I BGB (Beschluß des LG Berlin vom 2.8.1998 Az: 
16 O 201/98). Jede kommerzielle Nutzung der übermittelten 
persönlichen Daten sowie deren Weitergabe an Dritte ist ausdrücklich 
untersagt!

gpg key fingerprint: 5F64 4C92 9B77 DE37 D184  C5F9 B013 44E7 27BD 
763C
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic