from PyQt6.QtWidgets import ( QApplication, QMainWindow, QLabel, QVBoxLayout, QWidget, QFrame, QSplitter, QStackedWidget, QTabWidget ) from tab_musiclibrary import MusicLibraryTab from tab_settings import SettingsTab class MusicLibrary(QFrame): def __init__(self): super().__init__() library = QTabWidget() library.addTab(MusicLibraryTab(), "Songs") library.addTab(SettingsTab(), "Settings") layout = QVBoxLayout() layout.addWidget(library) self.setLayout(layout) class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Music Library") self.setFixedSize(800, 600) layout = QVBoxLayout() layout.addWidget( MusicLibrary() ) container = QWidget() container.setLayout(layout) container.layout().setContentsMargins(0, 0, 0, 0) self.setCentralWidget(container)