Created
December 26, 2017 02:14
-
-
Save eyllanesc/23a92afa071b9366deb0821ea1e674fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import sys | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
class Viewport(QWidget): | |
def __init__(self, parent=None): | |
super(Viewport, self).__init__(parent) | |
self.parent = parent | |
pal = self.palette() | |
pal.setColor(QPalette.Background, Qt.white) | |
self.setAutoFillBackground(True) | |
self.setPalette(pal) | |
self.box = QGroupBox(self) | |
self.box.setTitle("Speaker 1") # THIS BREAKS IT | |
self.box.setObjectName("speaker1") | |
self.box.setGeometry(12, 12, 200, 200) | |
class UI(QDialog): | |
def __init__(self, width, height, parent=None): | |
super(UI, self).__init__(parent) | |
self.parent = parent | |
self.width = width | |
self.height = height | |
self.view = Viewport(self) | |
lay = QVBoxLayout(self) | |
lay.setContentsMargins(21, 21, 21, 21) | |
lay.addWidget(self.view) | |
self.setLayout(lay) | |
self.setWindowFlags(Qt.FramelessWindowHint) | |
self.showFullScreen() | |
app = QApplication(sys.argv) | |
app.setStyle("fusion") | |
screen_resolution = app.desktop().screenGeometry() | |
width, height = screen_resolution.width(), screen_resolution.height() | |
ui = UI(width, height) | |
ui.show() | |
sys.exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment