refractor: add create_tab to utils of interface

This commit is contained in:
Vxrtrauter
2025-10-11 22:26:15 +02:00
parent 92a6fbc9b5
commit 9d0033dcb5
2 changed files with 18 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
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