PyQt QTabWidget which is the most common type. This has a lot of common features such as close a tab, close tabs to the left/right, close other tabs and so on.
Project description
pyqt-tab-widget
PyQt QTabWidget which is the most common type (if you doubt it, see the 'feature' section below). This has a lot of common features such as close a tab, close tabs to the left/right, close other tabs and so on.
Requirements
- PyQt5 >= 5.8
Setup
python -m pip install pyqt-tab-widget
Feature
-
List which is able to do with context menu
-
close a tab
-
close tabs to the left
-
close tabs to the right
-
close other tabs
-
close all tabs
-
reopen closed tab
-
-
Alt+Left to change the current tab to the very left tab
-
Alt+Right to change the current tab to the very right tab
-
Ctrl+F4 to close current tab
-
Close any tabs with clicking the close button (close button's style is defaut, i will customize it)
Example
Code Sample
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
from pyqt_tab_widget import TabWidget
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
tabWidget = TabWidget()
tabWidget.addTab(QWidget(), 'A')
tabWidget.addTab(QWidget(), 'B')
tabWidget.addTab(QWidget(), 'C')
tabWidget.addTab(QWidget(), 'D')
tabWidget.addTab(QWidget(), 'E')
self.setCentralWidget(tabWidget)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
Result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyqt_tab_widget-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce4a1433fe16a487f0e1412938dbfcfc56e93855469458a5b2fcc4613e7ab3a2 |
|
MD5 | fe8ba9bfb7f6f12616111a7ad7c38b9c |
|
BLAKE2b-256 | 139c53f40e3441265d7a173a26509500900f427c697c77413d4df2b536c0996a |