https://github.com/yjg30737/pyqt-listwidget-and-stackedwidget
PyQt QStackedWidget which can be set current widget by clicking QListWidget's item.
https://github.com/yjg30737/pyqt-listwidget-and-stackedwidget
pyqt pyqt-examples pyqt-gui pyqt-tutorial pyqt5 pyqt5-examples pyqt5-gui pyqt5-tutorial python python3 python37 qlistwidget qstackedwidget qt
Last synced: 3 months ago
JSON representation
PyQt QStackedWidget which can be set current widget by clicking QListWidget's item.
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-listwidget-and-stackedwidget
- Owner: yjg30737
- License: mit
- Created: 2022-01-23T05:48:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-23T06:19:46.000Z (over 3 years ago)
- Last Synced: 2024-12-29T08:42:11.680Z (5 months ago)
- Topics: pyqt, pyqt-examples, pyqt-gui, pyqt-tutorial, pyqt5, pyqt5-examples, pyqt5-gui, pyqt5-tutorial, python, python3, python37, qlistwidget, qstackedwidget, qt
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-listwidget-and-stackedwidget
PyQt QStackedWidget which can be set current widget by clicking QListWidget's item.## Requirements
PyQt5 >= 5.8## Included pacakges
* pyqt-resource-helper## Setup
```pip3 install git+https://github.com/yjg30737/pyqt-listwidget-and-stackedwidget.git --upgrade```## Usage
* ```addTab(widget: QWidget, text: str)``` to add item and widget corresponded with item## Example
Code Sample
```python
from PyQt5.QtWidgets import QApplication
from pyqt_listwidget_and_stackedwidget import ListWidgetAndStackedWidgetfrom pyqt_date_table_widget import DateTableWidget
from pyqt_top_left_right_file_list_widget import TopLeftRightFileListWidget
from pyqt_top_menu_bottom_widget import TopMenuBottomWidgetif __name__ == "__main__":
import sysapp = QApplication(sys.argv)
mainWindow = ListWidgetAndStackedWidget()
mainWindow.addTab(DateTableWidget(), 'DateTableWidget')
mainWindow.addTab(TopLeftRightFileListWidget(), 'TopLeftRightFileListWidget')
mainWindow.addTab(TopMenuBottomWidget(), 'TopMenuBottomWidget')
mainWindow.show()
app.exec_()
```Used packages in the example
* pyqt-date-table-widget
* pyqt-top-left-right-file-list-widget
* pyqt-top-menu-bottom-widgetResult
https://user-images.githubusercontent.com/55078043/150667031-ab3df36c-1ed4-4e57-ac83-a03fdffd138e.mp4