mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
fix gui not starting, caused by tabhelper
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLayout
|
||||
|
||||
# Tab creation helper function
|
||||
def create_tab(title, items, *, tabs, stretch=False):
|
||||
def create_tab(title, items, tabs, stretch):
|
||||
tab = QWidget()
|
||||
layout = QVBoxLayout()
|
||||
|
||||
for item in items:
|
||||
if item is None:
|
||||
continue
|
||||
|
||||
if isinstance(item, QLayout):
|
||||
layout.addLayout(item)
|
||||
wrapper = QWidget()
|
||||
wrapper.setLayout(item)
|
||||
layout.addWidget(wrapper)
|
||||
else:
|
||||
layout.addWidget(item)
|
||||
|
||||
if stretch:
|
||||
layout.addStretch()
|
||||
|
||||
tab.setLayout(layout)
|
||||
tabs.addTab(tab, title)
|
||||
return tab
|
||||
|
||||
Reference in New Issue
Block a user