|
[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 Monday 15 July 2002 08:24 am, Walt Mankowski wrote:
> That code segfaults? I'm surprised it even compiles. What type is
> qlBillBoard? It looks like it must be QLabel. Then you either want
> to say
it compiles perfectly but causes a memory leak.
what you really want is a:
qlBillBoard(qlIncoming);
instead. But make sure you are not deleteing your qlIncoming somewhere.
Remember QWidgets are all QObjects and can be deleted if the parent goes
away.
Your segfault is 90% sure in the fact that a new on QLabel calls show, well
the QLabel gets pissed because your parent pointer is 0.
Please read the Qt docs and this will become very clear, otherwise I have done
some Qt training, so you can fire off questions to me directly.
- -ian reinhart geiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9MsOzPy62TRm8dvgRAkEKAKC+BU+yUMuI4f4IsXs+esBQ6+Zu0ACeL7le
/HD3+RfKS3TxRDR9R35SEa0=
=5PsG
-----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
|
|