Music-Library/main_window.py
2024-04-23 09:50:01 +00:00

34 lines
942 B
Python

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)