Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9dfff4b

Browse files
committed
prevent focus being tied to tab bar
1 parent 915fe1f commit 9dfff4b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

IPython/frontend/qt/console/mainwindow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def __init__(self, app,
6767
self.tab_widget.tabCloseRequested[int].connect(self.close_tab)
6868

6969
self.setCentralWidget(self.tab_widget)
70+
# hide tab bar at first, since we have no tabs:
7071
self.tab_widget.tabBar().setVisible(False)
72+
# prevent focus in tab bar
73+
self.tab_widget.setFocusPolicy(QtCore.Qt.NoFocus)
7174

7275
def update_tab_bar_visibility(self):
7376
""" update visibility of the tabBar depending of the number of tab

0 commit comments

Comments
 (0)