mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
18 lines
454 B
Python
18 lines
454 B
Python
from PySide6.QtWidgets import QWidget, QVBoxLayout
|
|
|
|
|
|
def create_tab(title, searchbar, software_list, tabs, dlbutton, layout2):
|
|
tab = QWidget()
|
|
layout = QVBoxLayout()
|
|
if searchbar:
|
|
layout.addWidget(searchbar)
|
|
if layout2:
|
|
layout.addLayout(layout2)
|
|
else:
|
|
layout.addWidget(software_list)
|
|
if dlbutton:
|
|
layout.addWidget(dlbutton)
|
|
tab.setLayout(layout)
|
|
tabs.addTab(tab, title)
|
|
return tab
|