Merge pull request #1250 from PySimpleGUI/Dev-latest
Fix for crashing when Updating a table, got KeyEventsEnabled attribut…
This commit is contained in:
commit
ba8cfbcb4e
|
@ -2635,7 +2635,8 @@ class Table(Element):
|
||||||
|
|
||||||
|
|
||||||
class QTTableWidget(QTableWidget):
|
class QTTableWidget(QTableWidget):
|
||||||
def __init__(self, window):
|
def __init__(self, enable_key_events, window):
|
||||||
|
self.KeyEventsEnabled = enable_key_events
|
||||||
self.Window = window
|
self.Window = window
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
@ -5401,7 +5402,7 @@ def PackFormIntoFrame(window, containing_frame, toplevel_win):
|
||||||
qt_row_layout.addStretch(1)
|
qt_row_layout.addStretch(1)
|
||||||
# ------------------------- TABLE element ------------------------- #
|
# ------------------------- TABLE element ------------------------- #
|
||||||
elif element_type == ELEM_TYPE_TABLE:
|
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:
|
if element.NumRows is not None:
|
||||||
element.QT_TableWidget.setFixedHeight(element.NumRows*35+25)
|
element.QT_TableWidget.setFixedHeight(element.NumRows*35+25)
|
||||||
# element.QT_TableWidget = QTableWidget()
|
# element.QT_TableWidget = QTableWidget()
|
||||||
|
|
Loading…
Reference in New Issue