Got the context menu and focusing working.

This commit is contained in:
The Wobbler 2025-01-27 18:02:06 +01:00
parent 60dee10d1a
commit b2aa7ffd8c
4 changed files with 51 additions and 4 deletions

View file

@ -16,7 +16,9 @@ class TabTitle(QLineEdit):
self.setStyleSheet("QLineEdit {background: transparent;}")
self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.setFocusPolicy(Qt.FocusPolicy.TabFocus)
self.returnPressed.connect(self.clearFocus)
def mouseDoubleClickEvent(self, event: QMouseEvent):
self.tab_bar.tabBarDoubleClicked.emit(self.index)
@ -25,3 +27,6 @@ class TabTitle(QLineEdit):
self.tab_bar.tabBarClicked.emit(self.index)
self.tab_bar.setCurrentIndex(self.index)
def contextMenuEvent(self, event):
self.tab_bar.contextMenuEvent(event, self)