Jason on Wed, 17 Jul 2002 03:30:11 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] [ON TOPIC] passing a pointer to an object to an object (c++)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 16 July 2002 16H:05, Fred K Ollinger wrote:
> > You do not appear to be declaring the local pointer varible in your snip:
> >
> > voxInstallCommon::voxInstallCommon(QLabel *qlIncoming)
> > {
> >     QLabel *qlBillBoard=new QLabel("unlabeled", 0, 0);
> >     qlBillBoard=qlIncoming;
>
> OK, this pointer stuff doesn't work anyway b/c the QWizard widget's
> QLabel is only updated after the function returns, but I wanted to write a
> series of messages in the QWizard, like "copying this file" and "linking
> that file". So instead, I'm going to move most of these functions into the
> same class: voxWizardInstall. Problem solved. Just another example of
> something who was a bit too gung-ho about random classes. :)
>

Well, also think about the relationships of your classes. Is voxWizardInstall 
a special case of voxInstallCommon? Should voxWizardInstall inherit from 
voxInstallCommon? If so, would it make sense to move the QLabel then to the 
base class, voxInstallCommon? That might solve your problem.

> Gotta go and make all my variables global. :)
Very funnny...

>
> Thanks for all the help.
>
> Fred
>

Cheers,
Jason Nocks
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj00xwYACgkQ3CryLfCgqRnbuwCfek4owdGz8vv1+RciKO4h7ZfT
WwgAn27WnyzM2ZceE3cztw773n3nHJDu
=igjq
-----END PGP SIGNATURE-----


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug