[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: why doesn't this code paint on screen like it should?
From: Mathias Homann <Mathias.Homann () eregion ! de>
Date: 2004-09-26 14:30:53
Message-ID: 200409261630.55349.Mathias.Homann () eregion ! de
[Download RAW message or body]
Am Sonntag, 26. September 2004 13:12 schrieb Enrico Ros:
> On Sunday 26 September 2004 10:44, Mathias Homann wrote:
> > 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.
>
> You'll see for sure black background.
> About the paint: maybe if your eye is so fast you should see
> something like a text appearing, but it's too fast to catch.
>
> 1) That's why: painting stuff must be done on the protected:
> virtual void paintEvent ( QPaintEvent * )
> method. If you port your code inside that function and open the
> painter over the widget itself, then you'll see the text drawn.
this makes the kscreensaver template quite useless. it generates a
blank() method with the comment "put code to render your screensaver
here".
so i made my own member function, called it once from within blank(),
then connected my function with a timer. on the console i see that my
method is called at the appropriate intervals, but the window itself
stays black.
so, how am i supposed to do it?
bye,
MH
--
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