Expand last column; use ^Return to close editor

This commit is contained in:
Keith Edmunds 2022-09-04 19:20:54 +01:00
parent f2f99b5f79
commit 958edb0140

View File

@ -102,7 +102,7 @@ class NoSelectDelegate(QStyledItemDelegate):
"""By default, QPlainTextEdit doesn't handle enter or return"""
if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Return:
if (Qt.ShiftModifier & event.modifiers()) != Qt.ShiftModifier:
if event.modifiers() == Qt.ControlModifier:
self.commitData.emit(editor)
self.closeEditor.emit(editor)
@ -136,6 +136,7 @@ class PlaylistTab(QTableWidget):
self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
self.setRowCount(0)
self.setColumnCount(len(columns))
self.horizontalHeader().setStretchLastSection(True)
# Header row
for idx in [a for a in range(len(columns))]: