Fix for crashing when Updating a table, got KeyEventsEnabled attribute error

This commit is contained in:
MikeTheWatchGuy 2019-03-19 18:45:56 -04:00
parent 7a01747e43
commit 9497ae5e03
1 changed files with 3 additions and 2 deletions

View File

@ -2635,7 +2635,8 @@ class Table(Element):
class QTTableWidget(QTableWidget):
def __init__(self, window):
def __init__(self, enable_key_events, window):
self.KeyEventsEnabled = enable_key_events
self.Window = window
super().__init__()
@ -5401,7 +5402,7 @@ def PackFormIntoFrame(window, containing_frame, toplevel_win):
qt_row_layout.addStretch(1)
# ------------------------- TABLE element ------------------------- #
elif element_type == ELEM_TYPE_TABLE:
element.QT_TableWidget = Table.QTTableWidget(toplevel_win)
element.QT_TableWidget = Table.QTTableWidget(toplevel_win.ReturnKeyboardEvents, toplevel_win)
if element.NumRows is not None:
element.QT_TableWidget.setFixedHeight(element.NumRows*35+25)
# element.QT_TableWidget = QTableWidget()