[Kde-perl] Bug? Qt Designer and puic/uic.

Germain Garand kde-perl@mail.kde.org
Thu, 12 Dec 2002 10:26:07 +0000


Le Mercredi 11 D=E9cembre 2002 21:57, Steve Sloan a =E9crit :
> On Wed, 11 Dec 2002, Germain Garand wrote:
> > > My question relates to adding class member variables in Designer.
> > > Specifically, the fact that, although variables show up in the uic
> > > output,
> >
> > Ah, I did not take care of that, I think...
> > I'll have a look.
>
> Thanks.

OK. Done, will be in 3.004 final.
For what regards initialization (and cleanup), Designer uses init() and=20
destroy() pseudo-ctor/dtor functions.
Once you've created your member variables, click on the "functions" tab a=
nd=20
add a new function of return type void called "init()".
It will appear at the bottom of your .ui.h file and you should see it tag=
ged=20
in the function browser as "init() (constructor)"=20

Now, if for instance you've created the member variable "fooBar", you may=
=20
write the following inside init() :

void Form1::init()
{
    fooBar=3DQt::Time;
    fooBar->start;
}

a call to init() will be automatically inserted by puic at the end of the=
=20
object's real constructor.

G.


>
> > > they do not show-up in puic output.  Has anyone else experienced th=
is?
> > > Also, is there anyway of specifying initial values for member
> > > variables, and/or can you assume that they're always initialized to=
 0?
> >
> > Well, it's Perl, so they would just be undef until you initialize the=
m...
>
> Is there any way to initialize them in Designer?  Either with explicit
> values, or a user-modifiable "new" section?  It's such a trivial operat=
ion,
> but since you can't (or, at least, *shouldn't*) edit the output directl=
y
> ...
>
> [Ooh, *good* SigMonster. ;) ]
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
>=3D=3D=3D Steve Sloan                                     Hacker / Drumm=
er / Minor
> Deity
> -----------------------------------------------------------------------=
----
>--- Perl is the *correct* language to be writing bizarre line-noise crap=
 in.
> -- Dave Brown, in a.s.r
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
>=3D=3D=3D
>
> _______________________________________________
> Kde-perl mailing list
> Kde-perl@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-perl