PICARD-1782: Show a tooltip when user clicks on locked table header

This commit is contained in:
Philipp Wolfer
2020-09-29 16:48:38 +02:00
parent d7222c3a8e
commit 386faeef3e

View File

@@ -50,6 +50,10 @@ class TristateSortHeaderView(QtWidgets.QHeaderView):
def mouseReleaseEvent(self, event):
if self.is_locked:
tooltip = _(
"The table is locked. To enable sorting and column resizing\n"
"unlock the table in the table header's context menu.")
QtWidgets.QToolTip.showText(event.globalPos(), tooltip, self)
return
if event.button() == QtCore.Qt.LeftButton: