5 |
5 |
6 """ |
6 """ |
7 Module implementing a specialized tab bar for the web browser. |
7 Module implementing a specialized tab bar for the web browser. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt5.QtCore import Qt, QPoint, QTimer, QEvent |
10 from PyQt6.QtCore import Qt, QPoint, QTimer, QEvent |
11 from PyQt5.QtWidgets import QLabel |
11 from PyQt6.QtWidgets import QLabel |
12 |
12 |
13 from E5Gui.E5TabWidget import E5WheelTabBar |
13 from E5Gui.E5TabWidget import E5WheelTabBar |
14 from E5Gui.E5PassivePopup import E5PassivePopup, E5PassivePopupStyle |
14 from E5Gui.E5PassivePopup import E5PassivePopup, E5PassivePopupStyle |
15 |
15 |
16 import Preferences |
16 import Preferences |
97 if Preferences.getWebBrowser("ShowPreview"): |
97 if Preferences.getWebBrowser("ShowPreview"): |
98 # Find the tab under the mouse |
98 # Find the tab under the mouse |
99 i = 0 |
99 i = 0 |
100 tabIndex = -1 |
100 tabIndex = -1 |
101 while i < self.count() and tabIndex == -1: |
101 while i < self.count() and tabIndex == -1: |
102 if self.tabRect(i).contains(evt.pos()): |
102 if self.tabRect(i).contains(evt.position().toPoint()): |
103 tabIndex = i |
103 tabIndex = i |
104 i += 1 |
104 i += 1 |
105 |
105 |
106 # If found and not the current tab then show tab preview |
106 # If found and not the current tab then show tab preview |
107 if ( |
107 if ( |