[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: paintEvent problems - Regular Expression Widget
From: Espen Sand <espen.sand () neo ! no>
Date: 2000-05-04 13:17:58
[Download RAW message or body]
On Thu, 04 May 2000, Jesper K. Pedersen wrote:
>Hi.
>
>I have a number of problems with my Regular Expression Widget, which I have
>just checked in into kdenonbeta/tdg/Examples/RegExpWidget
>
>Here is the description of my problems:
>
>1) When I have sub widgets to a widget, where I define a paintEvent method,
>then this paintEvent method are *not* invoked when the widget is build.
>
>Try to run the example, and watch std.out. for messages where I cry for
>help (or search the code for qDebug).
>
>An example of this is:
>----------------------->
>WidgetMultiple::WidgetMultiple(QString txt,QWidget *parent, const char *name)
> :RegExpWidget(parent, name)
>{
> text = txt;
> DragAccepter *a1 = new DragAccepter(this);
> DragAccepter *a2 = new DragAccepter(this);
> a1->show();
> a2->show();
> children.append(new WidgetOrAccepter(0, a1));
> children.append(new WidgetOrAccepter(0, a2));
>
> qDebug("multiple-widget.cpp: Why is it necesary to call paintEvent explicit?");
>
> paintEvent(0);
>}
><-----------------------
>
>I believe that I shouldn't call the paintEvent method myself, or am I
>totally wrong?
>
I would think the paintEvent (or should we rename it painEvent :-) should be
called automatically, but anyway, I prefer to do such init stuff from a
reimplemented showEvent(..) when I think it is needed.
--
Espen Sand
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic