[PyKDE] trouble with QLabel

Steven James Samuel Stapleton stapleton at mps.ohio-state.edu
Mon Jan 8 09:29:04 GMT 2007

Thank you, I tried that along with adding the "self." in front of the items, 
and explicitly putting them in the class but I still get the same error.

#same to here
class about(qt.QWidget):
  _l = None
  _p = None
  def __init__(self, app):
    self._l = qt.QLabel("""
This is the Specs and Item generator for VAR.
This program is desiged to help create specs and
items in the VAR system.
Written by James Stapleton
""", self)
#the interveining up to here is also the same, the next line has been fixed, 
I decided to explicitly
#pass app rather than make it global.
    qt.QObject.connect(self._p, qt.SIGNAL("clicked()"), app, 
#and the ending is the same

----- Original Message ----- 
From: "Rick van Hattem" <Rick.van.Hattem at fawo.nl>
To: <pykde at mats.imk.fraunhofer.de>
Cc: "Steven James Samuel Stapleton" <stapleton at mps.ohio-state.edu>
Sent: Monday, January 08, 2007 2:08 AM
Subject: Re: [PyKDE] trouble with QLabel
> On Monday 08 January 2007 03:52, Steven James Samuel Stapleton wrote:
> > RuntimeError: Underlying C/C++ object has been deleted
> >
> > What could cause this?
> Exactly what is telling you, the object has been deleted ;)
> Try saving the object before using it.
> self.label = qt.QLabel() would work.
> label = qt.QLabel() does not work since that's a local function, after the
> function has finished it will be deleted by the garbage collector.

More information about the PyQt mailing list