mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
initial implementation of tabs
This commit is contained in:
@@ -12,6 +12,7 @@ from PySide6.QtWidgets import (
|
|||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QSpinBox,
|
QSpinBox,
|
||||||
|
QTabWidget,
|
||||||
)
|
)
|
||||||
from PySide6.QtGui import QIcon, QAction
|
from PySide6.QtGui import QIcon, QAction
|
||||||
import darkdetect
|
import darkdetect
|
||||||
@@ -81,6 +82,49 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
container.setLayout(containerLayout)
|
container.setLayout(containerLayout)
|
||||||
self.setCentralWidget(container)
|
self.setCentralWidget(container)
|
||||||
|
|
||||||
|
# Tabs
|
||||||
|
self.tabs = QTabWidget()
|
||||||
|
|
||||||
|
# Tab 1
|
||||||
|
self.tab1 = QWidget()
|
||||||
|
self.tab1_layout = QVBoxLayout()
|
||||||
|
self.tab1_layout.addWidget(self.searchbar)
|
||||||
|
self.tab1_layout.addWidget(self.softwareList)
|
||||||
|
self.tab1.setLayout(self.tab1_layout)
|
||||||
|
self.tabs.addTab(self.tab1,"Tab 1")
|
||||||
|
|
||||||
|
# Tab 2
|
||||||
|
self.tab2 = QWidget()
|
||||||
|
self.tab2_layout = QVBoxLayout()
|
||||||
|
self.tab2_layout.addWidget(self.searchbar)
|
||||||
|
self.tab2_layout.addWidget(self.softwareList)
|
||||||
|
self.tab2.setLayout(self.tab2_layout)
|
||||||
|
self.tabs.addTab(self.tab2,"Tab 2")
|
||||||
|
|
||||||
|
# Tab 3
|
||||||
|
self.tab3 = QWidget()
|
||||||
|
self.tab3_layout = QVBoxLayout()
|
||||||
|
self.tab3_layout.addWidget(self.searchbar)
|
||||||
|
self.tab3_layout.addWidget(self.softwareList)
|
||||||
|
self.tab3.setLayout(self.tab3_layout)
|
||||||
|
self.tabs.addTab(self.tab3,"Tab 3")
|
||||||
|
|
||||||
|
containerLayout.addWidget(self.tabs)
|
||||||
|
|
||||||
|
container = QWidget()
|
||||||
|
containerLayout = QVBoxLayout()
|
||||||
|
containerLayout.addWidget(self.searchbar)
|
||||||
|
|
||||||
|
containerLayout.addWidget(self.softwareList)
|
||||||
|
self.softwareList.addItems(searchresults)
|
||||||
|
|
||||||
|
containerLayout.addWidget(self.button)
|
||||||
|
# download button triggers
|
||||||
|
self.button.clicked.connect(lambda: self.run_thread(threading.Thread(target=self.download_selected)))
|
||||||
|
|
||||||
|
container.setLayout(containerLayout)
|
||||||
|
self.setCentralWidget(container)
|
||||||
|
|
||||||
containerLayout.setAlignment(Qt.AlignmentFlag.AlignBottom)
|
containerLayout.setAlignment(Qt.AlignmentFlag.AlignBottom)
|
||||||
|
|
||||||
toolbar = QToolBar("Main Toolbar")
|
toolbar = QToolBar("Main Toolbar")
|
||||||
|
|||||||
Reference in New Issue
Block a user