[PyQt] copy.deepcopy and PyQt?

Lukas Hetzenecker LuHe at gmx.at
Thu Apr 30 17:11:23 BST 2009


i noticed a problem when I tried the attatched script:
If a object is derived from QObject and i make a deepcopy of this object, all 
member variables get lost.
If I derive from object it works perfectly.

Please look at the attatched example. It produces the following output:
Hello World from MyObject!
Hello World from MyQObject!
Hello World from MyObject!
Traceback (most recent call last):
  File "test.py", line 31, in <module>
  File "test.py", line 10, in print_
    print self.string
AttributeError: string

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 557 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090430/f1a89cd4/test.py

More information about the PyQt mailing list