Working on a layout now

Getting there
This commit is contained in:
Salt 2020-03-07 18:46:47 -06:00
parent d489db5bea
commit 58f7cacec9

View File

@ -12,7 +12,9 @@ from appdirs import AppDirs
from pathlib import Path
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import (
QAction, qApp, QApplication, QMainWindow
QAction, qApp, QApplication, QMainWindow, QWidget,
QPushButton,
QGroupBox, QGridLayout, QHBoxLayout, QVBoxLayout
)
import argparse
import eyed3
@ -148,6 +150,9 @@ class BadWitchGUI(QMainWindow):
# Basics
self.badwitch = badwitch
self.lib = library
# Set central widget to something blank
# We don't care because we can access it later via method
self.setCentralWidget(QWidget())
# Init actions
self.initActions()
# Init UI
@ -169,6 +174,27 @@ class BadWitchGUI(QMainWindow):
fileMenu = menubar.addMenu('&File')
fileMenu.addAction(self.exitAct)
viewMenu = menubar.addMenu('&View')
# Container box
self.containerBox = QGridLayout()
containerBox = self.containerBox
containerBox.setSpacing(10)
self.centralWidget().setLayout(containerBox)
# Song browser box
self.libraryGroup = QGroupBox()
self.libraryBox = QVBoxLayout()
libraryBox = self.libraryBox
libraryBox.addWidget(self.libraryGroup)
containerBox.addLayout(libraryBox, 0, 0)
# Queue box
self.queueGroup = QGroupBox()
self.queueBox = QVBoxLayout()
queueBox = self.queueBox
testButton2 = QPushButton("queue")
queueBox.addWidget(self.queueGroup)
containerBox.addLayout(queueBox, 0, 1, 0, 2)
# Show
self.show()
class BadWitch: