Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.61 KB

File metadata and controls

48 lines (34 loc) · 1.61 KB

pyqt-listwidget-and-stackedwidget

PyQt QStackedWidget which can be set current widget by clicking QListWidget's item.

Requirements

PyQt5 >= 5.8

Included pacakges

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

from PyQt5.QtWidgets import QApplication
from pyqt_listwidget_and_stackedwidget import ListWidgetAndStackedWidget

from pyqt_date_table_widget import DateTableWidget
from pyqt_top_left_right_file_list_widget import TopLeftRightFileListWidget
from pyqt_top_menu_bottom_widget import TopMenuBottomWidget


if __name__ == "__main__":
    import sys

    app = 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

Result

example.mp4