https://github.com/yjg30737/pyqt-tab-widget
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.
https://github.com/yjg30737/pyqt-tab-widget
pyqt pyqt-examples pyqt5 pyqt5-examples pyqt5-tutorial python python3 python37 qt qtabwidget tabwidget
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-tab-widget
- Owner: yjg30737
- License: mit
- Created: 2022-02-12T04:51:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-15T00:49:52.000Z (about 3 years ago)
- Last Synced: 2024-04-25T21:44:18.647Z (about 1 year ago)
- Topics: pyqt, pyqt-examples, pyqt5, pyqt5-examples, pyqt5-tutorial, python, python3, python37, qt, qtabwidget, tabwidget
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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```python
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
from pyqt_tab_widget import TabWidgetclass 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 sysapp = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
```Result
