Working on a layout now
Getting there
This commit is contained in:
parent
d489db5bea
commit
58f7cacec9
28
badwitch.py
28
badwitch.py
@ -12,7 +12,9 @@ from appdirs import AppDirs
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QAction, qApp, QApplication, QMainWindow
|
QAction, qApp, QApplication, QMainWindow, QWidget,
|
||||||
|
QPushButton,
|
||||||
|
QGroupBox, QGridLayout, QHBoxLayout, QVBoxLayout
|
||||||
)
|
)
|
||||||
import argparse
|
import argparse
|
||||||
import eyed3
|
import eyed3
|
||||||
@ -148,6 +150,9 @@ class BadWitchGUI(QMainWindow):
|
|||||||
# Basics
|
# Basics
|
||||||
self.badwitch = badwitch
|
self.badwitch = badwitch
|
||||||
self.lib = library
|
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
|
# Init actions
|
||||||
self.initActions()
|
self.initActions()
|
||||||
# Init UI
|
# Init UI
|
||||||
@ -169,6 +174,27 @@ class BadWitchGUI(QMainWindow):
|
|||||||
fileMenu = menubar.addMenu('&File')
|
fileMenu = menubar.addMenu('&File')
|
||||||
fileMenu.addAction(self.exitAct)
|
fileMenu.addAction(self.exitAct)
|
||||||
viewMenu = menubar.addMenu('&View')
|
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()
|
self.show()
|
||||||
|
|
||||||
class BadWitch:
|
class BadWitch:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user