Music-Library/main_window.py

34 lines
942 B
Python
Raw Normal View History

2024-04-15 13:21:43 +00:00
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__()
2024-04-23 09:50:01 +00:00
self.setWindowTitle("Music Library")
2024-04-15 13:21:43 +00:00
self.setFixedSize(800, 600)
layout = QVBoxLayout()
layout.addWidget( MusicLibrary() )
container = QWidget()
container.setLayout(layout)
container.layout().setContentsMargins(0, 0, 0, 0)
self.setCentralWidget(container)