34 lines
935 B
Python
34 lines
935 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("My App")
|
|
self.setFixedSize(800, 600)
|
|
layout = QVBoxLayout()
|
|
layout.addWidget( MusicLibrary() )
|
|
container = QWidget()
|
|
container.setLayout(layout)
|
|
container.layout().setContentsMargins(0, 0, 0, 0)
|
|
self.setCentralWidget(container)
|
|
|