nifei
26th December 2008, 02:53
Hi, all,
Detailed Description about my question:
i created a panel widget (subclass of QWidget, (A)) to display some buttons. The count of buttons are dynamically changed in a slot called on_pageCount_changed(int), and this slot is connected with another object's (B) signal called pageCountChanged(int), and this signal is emitted when a resizeEvent happened to both the sender(B) and receiver(A) most of the time.
Summary:
That is to say, a behavior of delete/new children objects of object (A) is triggered by another object, B's signal, and this behavior might be triggered the same time when a resizeEvent happend to (A) or (both A and B).
Some times crash happens (not every time) to
"Unhandled exception at 0x65048e50 (QtGuid4.dll) in demo1120d.exe: 0xC0000005: Access violation reading location 0xfeeefefe."
and if i delete the additional buttons next time the slot is called or if i just hide them, this error will not happen.
so i am wondering if there is any limitation about what could be done when a resizeEvent happened, can objects be delete dynamically or not?
Any help and suggestions will be greatly appreciately, thank you
Detailed Description about my question:
i created a panel widget (subclass of QWidget, (A)) to display some buttons. The count of buttons are dynamically changed in a slot called on_pageCount_changed(int), and this slot is connected with another object's (B) signal called pageCountChanged(int), and this signal is emitted when a resizeEvent happened to both the sender(B) and receiver(A) most of the time.
Summary:
That is to say, a behavior of delete/new children objects of object (A) is triggered by another object, B's signal, and this behavior might be triggered the same time when a resizeEvent happend to (A) or (both A and B).
Some times crash happens (not every time) to
"Unhandled exception at 0x65048e50 (QtGuid4.dll) in demo1120d.exe: 0xC0000005: Access violation reading location 0xfeeefefe."
and if i delete the additional buttons next time the slot is called or if i just hide them, this error will not happen.
so i am wondering if there is any limitation about what could be done when a resizeEvent happened, can objects be delete dynamically or not?
Any help and suggestions will be greatly appreciately, thank you