Unless we are missing something, the following is a bug: We have the following
class QReduceBlockData(QTextBlockUserData):
def __init__(self,n):
QTextBlockUserData.__init__(self)
self.message = "Hallo " + str(n)
Somewhere else in our code, we try:
cursor.block().setUserData(QReduceBlockData(4711))
print cursor.block().userData().message
This yields an error: "RuntimeError: Internal C++ object already deleted."
If we introduce a variable like
data = QReduceBlockData(4711)
cursor.block().setUserData(data)
print cursor.block().userData().message
Then it works.
This looks similar to a bug reported by anatoly techtonik <[email protected]>
two days ago (Subject "Chained method calls fail: Internal C++ object already
deleted.").
Thomas
--
Dr. habil. Thomas Sturm
Departamento de Matematicas, Estadistica y Computacion
Universidad de Cantabria, Santander, Spain
Avda. Los Castros s/n, Room 1072, +34 693 251058
http://personales.unican.es/sturmt/
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
