From 958edb0140a72a1d40c6ae2d9ef3d878fb4240c4 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sun, 4 Sep 2022 19:20:54 +0100 Subject: [PATCH] Expand last column; use ^Return to close editor --- app/playlists.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/playlists.py b/app/playlists.py index 947b7bf..0639e44 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -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))]: