Got the context menu and focusing working.
This commit is contained in:
parent
60dee10d1a
commit
b2aa7ffd8c
4 changed files with 51 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue