mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
77c2e9cd9e
UI: remove trackertable from the Search tab and reorder widgets to correct layout. Tab helper: add QLayout directly instead of wrapping it in a temporary QWidget to avoid extra nesting. Search helper: clear the trackertable rows and reset state.posts when starting a new search to ensure fresh results. Minor: import check_space in main and simplify an unused loop variable in libtorrent_int for clarity/linting.
23 lines
492 B
Python
23 lines
492 B
Python
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLayout
|
|
|
|
# Tab creation helper function
|
|
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)
|
|
else:
|
|
layout.addWidget(item)
|
|
|
|
if stretch:
|
|
layout.addStretch()
|
|
|
|
tab.setLayout(layout)
|
|
tabs.addTab(tab, title)
|
|
return tab
|