Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.2.3
-
None
-
Windows 10; Python 2.7.16
Description
This bug presents when I put a whole lot of QSpinBox's inside a QTableWidget. When you run the attached example, the message "Row.print_str called" is displayed when the valueChanged event fires on rows 1 to 5 (and oddly row 10) of the table, but on rows 6 to 9, the valueChanged event doesn't fire and nothing is printed. The only difference between the QSpinBox's that work and don't is whether they are saved in a list after creation or not. So it seems like this is a garbage collection or reference counting problem, where the spinboxes that are not stored in a list are getting disposed of prematurely. See the following lines:
# these are saved in a list
# and so seem to work
rows = []
for x in range(0, 5):
row = Row(t, x)
row.add_to_table()
rows.append(row)
- these rows don't work
# presumably due to a garbage
# collection/reference counting bug
for x in range(5, 10):
row = Row(t, x)
row.add_to_table()
Note: I'm using PySide._version_ 1.2.4 but this doesn't seem to be an option in the affects version dropdown.