def init_ui(self):
background_color = QColor()
background_color.setNamedColor('#282821')
color_palette = self.text_editor.palette()
color_palette.setColor(QPalette.Text, Qt.white)
color_palette.setColor(QPalette.Base, background_color)
self.text_editor.setPalette(color_palette)
default_font = self.text_editor.font()
default_font.setPointSize(9)
self.text_editor.setFont(default_font)
self.setWindowTitle('Example')
self.setCentralWidget(self.text_editor)
self.setGeometry(500, 500, 500, 500)
self.show()
python类white()的实例源码
def __init__(self):
QtWidgets.QWidget.__init__(self)
uic.loadUi("window.ui", self)
self.scene = Scene(0, 0, 561, 581)
self.scene.win = self
self.view.setScene(self.scene)
self.image = QImage(561, 581, QImage.Format_ARGB32_Premultiplied)
self.image.fill(Qt.white)
self.bars.clicked.connect(lambda : set_bars(self))
self.erase.clicked.connect(lambda: clean_all(self))
self.paint.clicked.connect(lambda: clipping(self))
self.rect.clicked.connect(lambda: set_rect(self))
self.ect.clicked.connect(lambda: add_bars(self))
self.lock.clicked.connect(lambda: lock(self))
self.lines = []
self.edges = []
self.clip = None
self.point_now_rect = None
self.point_now_bars = None
self.point_lock = None
self.input_bars = False
self.input_rect = False
self.pen = QPen(black)
def clean_all(win):
win.scene.clear()
win.table_rect.clear()
win.table_bars.clear()
win.lines = []
win.edges = []
win.point_now_rect = None
win.point_now_bars = None
win.point_lock = None
win.image.fill(Qt.white)
r = win.table_rect.rowCount()
for i in range(r, -1, -1):
win.table_rect.removeRow(i)
r = win.table_bars.rowCount()
for i in range(r, -1, -1):
win.table_bars.removeRow(i)
def __init__(self):
QtWidgets.QWidget.__init__(self)
uic.loadUi("window.ui", self)
self.scene = QtWidgets.QGraphicsScene(0, 0, 511, 511)
self.mainview.setScene(self.scene)
self.image = QImage(511, 511, QImage.Format_ARGB32_Premultiplied)
self.pen = QPen()
self.color_line = QColor(Qt.black)
self.color_bground = QColor(Qt.white)
self.draw_once.clicked.connect(lambda: draw_once(self))
self.clean_all.clicked.connect(lambda: clear_all(self))
self.btn_bground.clicked.connect(lambda: get_color_bground(self))
self.btn_line.clicked.connect(lambda: get_color_line(self))
self.draw_centr.clicked.connect(lambda: draw_centr(self))
layout = QtWidgets.QHBoxLayout()
layout.addWidget(self.what)
layout.addWidget(self.other)
self.setLayout(layout)
self.circle.setChecked(True)
self.canon.setChecked(True)
#self.circle.toggled.connect(lambda : change_text(self))
def __init__(self):
QtWidgets.QWidget.__init__(self)
uic.loadUi("window.ui", self)
self.scene = Scene(0, 0, 561, 581)
self.scene.win = self
self.view.setScene(self.scene)
self.image = QImage(561, 581, QImage.Format_ARGB32_Premultiplied)
self.image.fill(Qt.white)
self.bars.clicked.connect(lambda : set_bars(self))
self.erase.clicked.connect(lambda: clean_all(self))
self.paint.clicked.connect(lambda: clipping(self))
self.rect.clicked.connect(lambda: set_rect(self))
self.ect.clicked.connect(lambda: add_bars(self))
self.lines = []
self.clip = None
self.point_now = None
self.input_bars = False
self.input_rect = False
self.pen = QPen(red)
def initUI(self):
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
# Set window background color
self.setAutoFillBackground(True)
p = self.palette()
p.setColor(self.backgroundRole(), Qt.white)
self.setPalette(p)
# Add paint widget and paint
self.m = PaintWidget(self)
self.m.move(0,0)
self.m.resize(self.width,self.height)
self.show()
def initUI(self):
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
# Set window background color
self.setAutoFillBackground(True)
p = self.palette()
p.setColor(self.backgroundRole(), Qt.white)
self.setPalette(p)
# Add paint widget and paint
self.m = PaintWidget(self)
self.m.move(0,0)
self.m.resize(self.width,self.height)
self.show()
def __init__(self):
super(VideoStyleLight, self).__init__()
palette = qApp.palette()
palette.setColor(QPalette.Window, QColor(239, 240, 241))
palette.setColor(QPalette.WindowText, QColor(49, 54, 59))
palette.setColor(QPalette.Base, QColor(252, 252, 252))
palette.setColor(QPalette.AlternateBase, QColor(239, 240, 241))
palette.setColor(QPalette.ToolTipBase, QColor(239, 240, 241))
palette.setColor(QPalette.ToolTipText, QColor(49, 54, 59))
palette.setColor(QPalette.Text, QColor(49, 54, 59))
palette.setColor(QPalette.Button, QColor(239, 240, 241))
palette.setColor(QPalette.ButtonText, QColor(49, 54, 59))
palette.setColor(QPalette.BrightText, QColor(255, 255, 255))
palette.setColor(QPalette.Link, QColor(41, 128, 185))
palette.setColor(QPalette.Highlight, QColor(136, 136, 136))
palette.setColor(QPalette.HighlightedText, QColor(239, 240, 241))
palette.setColor(QPalette.Disabled, QPalette.Light, Qt.white)
palette.setColor(QPalette.Disabled, QPalette.Shadow, QColor(234, 234, 234))
qApp.setPalette(palette)
def __init__(self):
super(VideoStyleDark, self).__init__()
palette = qApp.palette()
palette.setColor(QPalette.Window, QColor(27, 35, 38))
palette.setColor(QPalette.WindowText, QColor(234, 234, 234))
palette.setColor(QPalette.Base, QColor(27, 35, 38))
palette.setColor(QPalette.AlternateBase, QColor(12, 15, 16))
palette.setColor(QPalette.ToolTipBase, QColor(27, 35, 38))
palette.setColor(QPalette.ToolTipText, Qt.white)
palette.setColor(QPalette.Text, QColor(234, 234, 234))
palette.setColor(QPalette.Button, QColor(27, 35, 38))
palette.setColor(QPalette.ButtonText, Qt.white)
palette.setColor(QPalette.BrightText, QColor(100, 215, 222))
palette.setColor(QPalette.Link, QColor(126, 71, 130))
palette.setColor(QPalette.Highlight, QColor(126, 71, 130))
palette.setColor(QPalette.HighlightedText, Qt.white)
palette.setColor(QPalette.Disabled, QPalette.Light, Qt.black)
palette.setColor(QPalette.Disabled, QPalette.Shadow, QColor(12, 15, 16))
qApp.setPalette(palette)
def paint(
self,
painter: QPainter,
option: QStyleOptionGraphicsItem,
widget: QWidget):
pen = QPen()
pen.setWidth(3)
painter.setRenderHint(QPainter.Antialiasing)
pen.setColor(QColor(61, 61, 61, 255))
painter.setPen(pen)
painter.setBrush(QBrush(QColor(61, 61, 61, 255), Qt.SolidPattern))
painter.drawRect(
QRectF(-self.maxWidth / 2, -10, self.maxWidth, 20))
painter.setBrush(QBrush(QColor(240, 217, 108, 255), Qt.SolidPattern))
painter.drawRect(
QRectF(-self.maxWidth / 2, -10, self.displayWidth, 20))
path = QPainterPath()
path.addText(-self.maxWidth / 2, 35, QFont('monospace', 18, QFont.Bold), f'{self.name} Lv.{self.level} Exp. {self.actualExperience:{len(str(self.maxExperience))}}/{self.maxExperience}')
# pen.setColor(Qt.white)
pen.setWidth(2)
painter.setPen(pen)
painter.setBrush(QBrush(QColor(0, 0, 0, 61), Qt.SolidPattern))
painter.drawPath(path)
def paint(self, painter, rect):
panel = QStyleOptionFrame()
self.initStyleOption(panel)
style = self.style()
# use PE_PanelLineEdit instead of static PE_Frame to have hover/focus
# animation
style.drawPrimitive(QStyle.PE_PanelLineEdit, panel, painter, self)
rect = style.subElementRect(QStyle.SE_FrameContents, panel, self)
painter.fillRect(rect, Qt.white)
innerRect = rect.adjusted(2, 2, -2, -2)
if self._color is not None:
painter.fillRect(innerRect, self._color)
else:
pen = painter.pen()
pen.setColor(strikeColor)
pen.setWidthF(1.5)
painter.setPen(pen)
painter.setRenderHint(QStylePainter.Antialiasing)
painter.setClipRect(innerRect)
bL = innerRect.bottomLeft()
bL.setY(bL.y() + .5)
tR = innerRect.topRight()
tR.setY(tR.y() + 1)
painter.drawLine(bL, tR)
def __init__(self, parent=None):
super().__init__()
self.parent = parent
hlayout = QHBoxLayout()
self.setLayout(hlayout)
font_combobox = QFontComboBox()
font_combobox.setEditable(False)
font_combobox.setFixedHeight(30)
font_combobox.setStyleSheet("QFontComboBox {background-color: white; color: black; border-radius: 3px;\
border-color: lightgray; border-style: solid; border-width:2px;} \
QFontComboBox::down-arrow {image: url(/usr/share/icons/breeze/actions/24/arrow-down)} \
QFontComboBox::drop-down {border:none;}")
font_combobox.setCurrentText(settings().value("Subtitle/font"))
hlayout.addWidget(font_combobox)
self.color_button = QPushButton()
self.color_button.setFixedSize(30, 30)
self.color_button.setStyleSheet("QPushButton {border: 1px solid black; border-radius: 3px; \
background-color: %s; }"%(settings().value("Subtitle/color") or QColor("#ffffff")).name())
hlayout.addWidget(self.color_button)
self.color_button.clicked.connect(self.colorSelected)
font_combobox.currentIndexChanged[str].connect(self.fontChanged)
def __init__(self, parent=None):
super().__init__()
self.parent = parent
self.setWindowFlags(Qt.Tool)
self.setVisible(False)
self.resize(300, 250)
self.move(settings().value("Settings/position") or QPoint(250,250))
self.setWindowIcon(QIcon.fromTheme("pisiplayer"))
self.setWindowTitle(self.tr("Ayarlar"))
self.setStyleSheet("""QToolBox::tab {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
border-radius: 5px;
color: darkgray;
}
QToolBox::tab:selected { /* italicize selected tabs */
font: italic;
color: white;
}""")
page1 = self.addItem(SubtitleWidget(self), self.tr("Altyaz?lar"))
page2 = self.addItem(YoutubeWidget(self), self.tr("Youtube"))
def __init__(self, parent=None):
super(SvgView, self).__init__(parent)
self.renderer = SvgView.Native
self.svgItem = None
self.backgroundItem = None
self.outlineItem = None
self.image = QImage()
self.setScene(QGraphicsScene(self))
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
self.setDragMode(QGraphicsView.ScrollHandDrag)
self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
# Prepare background check-board pattern.
tilePixmap = QPixmap(64, 64)
tilePixmap.fill(Qt.white)
tilePainter = QPainter(tilePixmap)
color = QColor(220, 220, 220)
tilePainter.fillRect(0, 0, 32, 32, color)
tilePainter.fillRect(32, 32, 32, 32, color)
tilePainter.end()
self.setBackgroundBrush(QBrush(tilePixmap))
def paintEvent(self, event):
painter = QPainter(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.fillRect(event.rect(), QBrush(Qt.white))
painter.translate(66, 66)
painter.save()
self.transformPainter(painter)
self.drawShape(painter)
painter.restore()
self.drawOutline(painter)
self.transformPainter(painter)
self.drawCoordinates(painter)
def __init__(self, parent=None):
super(DragWidget, self).__init__(parent)
dictionaryFile = QFile(':/dictionary/words.txt')
dictionaryFile.open(QIODevice.ReadOnly)
x = 5
y = 5
for word in QTextStream(dictionaryFile).readAll().split():
wordLabel = DragLabel(word, self)
wordLabel.move(x, y)
wordLabel.show()
x += wordLabel.width() + 2
if x >= 195:
x = 5
y += wordLabel.height() + 2
newPalette = self.palette()
newPalette.setColor(QPalette.Window, Qt.white)
self.setPalette(newPalette)
self.setAcceptDrops(True)
self.setMinimumSize(400, max(200, y))
self.setWindowTitle("Draggable Text")
def setupSceneItems(self):
if Colors.showFps:
self.fpsLabel = DemoTextItem("FPS: --", Colors.buttonFont(),
Qt.white, -1, None, DemoTextItem.DYNAMIC_TEXT)
self.fpsLabel.setZValue(1000)
self.fpsLabel.setPos(Colors.stageStartX,
600 - QFontMetricsF(Colors.buttonFont()).height() - 5)
self.mainSceneRoot = QGraphicsWidget()
self.scene.addItem(self.mainSceneRoot)
self.companyLogo = ImageItem(
QImage(self.imagesDir + '/trolltech-logo.png'),
1000, 1000, None, True, 0.5)
self.qtLogo = ImageItem(QImage(self.imagesDir + '/qtlogo_small.png'),
1000, 1000, None, True, 0.5)
self.companyLogo.setZValue(100)
self.qtLogo.setZValue(100)
self.pausedLabel = DemoTextItem("PAUSED", Colors.buttonFont(),
Qt.white, -1, None)
self.pausedLabel.setZValue(100)
fm = QFontMetricsF(Colors.buttonFont())
self.pausedLabel.setPos(Colors.stageWidth - fm.width("PAUSED"),
590 - fm.height())
self.pausedLabel.setRecursiveVisible(False)
def __init__(self, parent=None):
super(SvgView, self).__init__(parent)
self.renderer = SvgView.Native
self.svgItem = None
self.backgroundItem = None
self.outlineItem = None
self.image = QImage()
self.setScene(QGraphicsScene(self))
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
self.setDragMode(QGraphicsView.ScrollHandDrag)
self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
# Prepare background check-board pattern.
tilePixmap = QPixmap(64, 64)
tilePixmap.fill(Qt.white)
tilePainter = QPainter(tilePixmap)
color = QColor(220, 220, 220)
tilePainter.fillRect(0, 0, 32, 32, color)
tilePainter.fillRect(32, 32, 32, 32, color)
tilePainter.end()
self.setBackgroundBrush(QBrush(tilePixmap))
def paintEvent(self, event):
painter = QPainter(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.fillRect(event.rect(), QBrush(Qt.white))
painter.translate(66, 66)
painter.save()
self.transformPainter(painter)
self.drawShape(painter)
painter.restore()
self.drawOutline(painter)
self.transformPainter(painter)
self.drawCoordinates(painter)
def __init__(self, parent=None):
super(DragWidget, self).__init__(parent)
dictionaryFile = QFile(':/dictionary/words.txt')
dictionaryFile.open(QIODevice.ReadOnly)
x = 5
y = 5
for word in QTextStream(dictionaryFile).readAll().split():
wordLabel = DragLabel(word, self)
wordLabel.move(x, y)
wordLabel.show()
x += wordLabel.width() + 2
if x >= 195:
x = 5
y += wordLabel.height() + 2
newPalette = self.palette()
newPalette.setColor(QPalette.Window, Qt.white)
self.setPalette(newPalette)
self.setAcceptDrops(True)
self.setMinimumSize(400, max(200, y))
self.setWindowTitle("Draggable Text")
def setupSceneItems(self):
if Colors.showFps:
self.fpsLabel = DemoTextItem("FPS: --", Colors.buttonFont(),
Qt.white, -1, None, DemoTextItem.DYNAMIC_TEXT)
self.fpsLabel.setZValue(1000)
self.fpsLabel.setPos(Colors.stageStartX,
600 - QFontMetricsF(Colors.buttonFont()).height() - 5)
self.mainSceneRoot = QGraphicsWidget()
self.scene.addItem(self.mainSceneRoot)
self.companyLogo = ImageItem(
QImage(self.imagesDir + '/trolltech-logo.png'),
1000, 1000, None, True, 0.5)
self.qtLogo = ImageItem(QImage(self.imagesDir + '/qtlogo_small.png'),
1000, 1000, None, True, 0.5)
self.companyLogo.setZValue(100)
self.qtLogo.setZValue(100)
self.pausedLabel = DemoTextItem("PAUSED", Colors.buttonFont(),
Qt.white, -1, None)
self.pausedLabel.setZValue(100)
fm = QFontMetricsF(Colors.buttonFont())
self.pausedLabel.setPos(Colors.stageWidth - fm.width("PAUSED"),
590 - fm.height())
self.pausedLabel.setRecursiveVisible(False)
def __init__(self, parent=None):
super(SvgView, self).__init__(parent)
self.renderer = SvgView.Native
self.svgItem = None
self.backgroundItem = None
self.outlineItem = None
self.image = QImage()
self.setScene(QGraphicsScene(self))
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
self.setDragMode(QGraphicsView.ScrollHandDrag)
self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
# Prepare background check-board pattern.
tilePixmap = QPixmap(64, 64)
tilePixmap.fill(Qt.white)
tilePainter = QPainter(tilePixmap)
color = QColor(220, 220, 220)
tilePainter.fillRect(0, 0, 32, 32, color)
tilePainter.fillRect(32, 32, 32, 32, color)
tilePainter.end()
self.setBackgroundBrush(QBrush(tilePixmap))
def paintEvent(self, event):
painter = QPainter(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.fillRect(event.rect(), QBrush(Qt.white))
painter.translate(66, 66)
painter.save()
self.transformPainter(painter)
self.drawShape(painter)
painter.restore()
self.drawOutline(painter)
self.transformPainter(painter)
self.drawCoordinates(painter)
def __init__(self, parent=None):
super(DragWidget, self).__init__(parent)
dictionaryFile = QFile(':/dictionary/words.txt')
dictionaryFile.open(QIODevice.ReadOnly)
x = 5
y = 5
for word in QTextStream(dictionaryFile).readAll().split():
wordLabel = DragLabel(word, self)
wordLabel.move(x, y)
wordLabel.show()
x += wordLabel.width() + 2
if x >= 195:
x = 5
y += wordLabel.height() + 2
newPalette = self.palette()
newPalette.setColor(QPalette.Window, Qt.white)
self.setPalette(newPalette)
self.setAcceptDrops(True)
self.setMinimumSize(400, max(200, y))
self.setWindowTitle("Draggable Text")
def setupSceneItems(self):
if Colors.showFps:
self.fpsLabel = DemoTextItem("FPS: --", Colors.buttonFont(),
Qt.white, -1, None, DemoTextItem.DYNAMIC_TEXT)
self.fpsLabel.setZValue(1000)
self.fpsLabel.setPos(Colors.stageStartX,
600 - QFontMetricsF(Colors.buttonFont()).height() - 5)
self.mainSceneRoot = QGraphicsWidget()
self.scene.addItem(self.mainSceneRoot)
self.companyLogo = ImageItem(
QImage(self.imagesDir + '/trolltech-logo.png'),
1000, 1000, None, True, 0.5)
self.qtLogo = ImageItem(QImage(self.imagesDir + '/qtlogo_small.png'),
1000, 1000, None, True, 0.5)
self.companyLogo.setZValue(100)
self.qtLogo.setZValue(100)
self.pausedLabel = DemoTextItem("PAUSED", Colors.buttonFont(),
Qt.white, -1, None)
self.pausedLabel.setZValue(100)
fm = QFontMetricsF(Colors.buttonFont())
self.pausedLabel.setPos(Colors.stageWidth - fm.width("PAUSED"),
590 - fm.height())
self.pausedLabel.setRecursiveVisible(False)
def __init__(self):
super().__init__()
self.setColor(QPalette.Window, QColor(53, 53, 53))
self.setColor(QPalette.WindowText, QColor(174, 167, 159))
self.setColor(QPalette.Base, QColor(63, 63, 63))
self.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
self.setColor(QPalette.ToolTipBase, Qt.white)
self.setColor(QPalette.ToolTipText, Qt.white)
self.setColor(QPalette.Text, QColor(174, 167, 159))
self.setColor(QPalette.Button, QColor(53, 53, 53))
self.setColor(QPalette.ButtonText, QColor(174, 167, 159))
# blue
self.setColor(QPalette.BrightText, QColor(42, 130, 218))
self.setColor(QPalette.Link, QColor(42, 130, 218))
self.setColor(QPalette.Highlight, QColor(42, 130, 218))
self.setColor(QPalette.HighlightedText, Qt.white)
self.setColor(QPalette.Disabled, QPalette.Window, QColor(51, 51, 51))
self.setColor(QPalette.Disabled, QPalette.ButtonText,
QColor(51, 51, 51))
self.setColor(QPalette.Disabled, QPalette.Text, QColor(122, 118, 113))
self.setColor(QPalette.Disabled, QPalette.WindowText,
QColor(122, 118, 113))
self.setColor(QPalette.Disabled, QPalette.Base, QColor(32, 32, 32))
def initUI(self):
# QToolTip.setFont(QFont('SansSerif', 9))
self.cwidget = GUICenterWidget()
self.setCentralWidget(self.cwidget)
# self.setToolTip('This is a <b>QWidget</b> widget')
self.statusBar().showMessage('Ready')
self.center()
self.setWindowTitle('Coliform Control GUI')
self.onewiretimer = QTimer(self)
self.onewiretimer.timeout.connect(self.cwidget.onewireOn)
self.onewiretimer.start(1000)
# self.p = QPalette(self.palette())
# self.p.setColor(QPalette.Window, QColor(53, 53, 53))
# self.p.setColor(QPalette.WindowText, Qt.white)
# self.p.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
# self.p.setColor(QPalette.ToolTipBase, Qt.white)
# self.p.setColor(QPalette.ToolTipText, Qt.white)
# self.p.setColor(QPalette.Button, QColor(53, 53, 53))
# self.p.setColor(QPalette.ButtonText, Qt.white)
# self.p.setColor(QPalette.BrightText, Qt.red)
# self.p.setColor(QPalette.Highlight, QColor(142, 45, 197).lighter())
# self.p.setColor(QPalette.HighlightedText, Qt.black)
# self.setPalette(self.p)
self.show()
def initUI(self):
# QToolTip.setFont(QFont('SansSerif', 9))
self.cwidget = CameraCenterWidget()
self.setCentralWidget(self.cwidget)
# self.setToolTip('This is a <b>QWidget</b> widget')
self.center()
self.setWindowTitle('Camera Control GUI')
self.statusBarTimer = QTimer(self)
self.statusBarTimer.timeout.connect(self.statusUpdate)
self.statusBarTimer.start(100)
# self.p = QPalette(self.palette())
# self.p.setColor(QPalette.Window, QColor(53, 53, 53))
# self.p.setColor(QPalette.WindowText, Qt.white)
# self.p.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
# self.p.setColor(QPalette.ToolTipBase, Qt.white)
# self.p.setColor(QPalette.ToolTipText, Qt.white)
# self.p.setColor(QPalette.Button, QColor(53, 53, 53))
# self.p.setColor(QPalette.ButtonText, Qt.white)
# self.p.setColor(QPalette.BrightText, Qt.red)
# self.p.setColor(QPalette.Highlight, QColor(142, 45, 197).lighter())
# self.p.setColor(QPalette.HighlightedText, Qt.black)
# self.setPalette(self.p)
self.show()
def initUI(self):
# QToolTip.setFont(QFont('SansSerif', 9))
self.cwidget = RGBCenterWidget()
self.setCentralWidget(self.cwidget)
# self.setToolTip('This is a <b>QWidget</b> widget')
self.center()
self.setWindowTitle('RGB Sensor GUI')
self.statusBarTimer = QTimer(self)
self.statusBarTimer.timeout.connect(self.statusUpdate)
self.statusBarTimer.start(100)
# self.p = QPalette(self.palette())
# self.p.setColor(QPalette.Window, QColor(53, 53, 53))
# self.p.setColor(QPalette.WindowText, Qt.white)
# self.p.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
# self.p.setColor(QPalette.ToolTipBase, Qt.white)
# self.p.setColor(QPalette.ToolTipText, Qt.white)
# self.p.setColor(QPalette.Button, QColor(53, 53, 53))
# self.p.setColor(QPalette.ButtonText, Qt.white)
# self.p.setColor(QPalette.BrightText, Qt.red)
# self.p.setColor(QPalette.Highlight, QColor(142, 45, 197).lighter())
# self.p.setColor(QPalette.HighlightedText, Qt.black)
# self.setPalette(self.p)
self.show()
def brush(self, color=Qt.white, style=Qt.SolidPattern):
return QBrush(color, style)