From 8de3836bee7b844b75564f12b700c323c4f3d53b Mon Sep 17 00:00:00 2001 From: Tomas Prochazka Date: Wed, 27 Feb 2019 12:20:36 +0100 Subject: Setting background color dial Setting the background color of the graphical component dial, which the color it representing (RGB) --- qtmips_gui/peripheralsview.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qtmips_gui') diff --git a/qtmips_gui/peripheralsview.cpp b/qtmips_gui/peripheralsview.cpp index 8ce82fc..6c1208d 100644 --- a/qtmips_gui/peripheralsview.cpp +++ b/qtmips_gui/peripheralsview.cpp @@ -7,6 +7,10 @@ PeripheralsView::PeripheralsView(QWidget *parent) : { ui->setupUi(this); + ui->dialRed->setStyleSheet("QDial { background-color: red }"); + ui->dialGreen->setStyleSheet("QDial { background-color: green }"); + ui->dialBlue->setStyleSheet("QDial { background-color: blue }"); + connect(ui->dialRed, SIGNAL(valueChanged(int)), ui->spinRed, SLOT(setValue(int))); connect(ui->dialGreen, SIGNAL(valueChanged(int)), ui->spinGreen, SLOT(setValue(int))); connect(ui->dialBlue, SIGNAL(valueChanged(int)), ui->spinBlue, SLOT(setValue(int))); -- cgit v1.2.3