diff -r f160fbc139b1 -r edad8a7bcaea QTfrontend/ui/widget/colorwidget.cpp --- a/QTfrontend/ui/widget/colorwidget.cpp Sat Oct 13 00:07:46 2012 +0400 +++ b/QTfrontend/ui/widget/colorwidget.cpp Sat Oct 13 00:35:20 2012 +0400 @@ -1,17 +1,17 @@ #include #include #include +#include #include "colorwidget.h" #include "hwconsts.h" ColorWidget::ColorWidget(QStandardItemModel *colorsModel, QWidget *parent) : - QWidget(parent) + QFrame(parent) { m_colorsModel = colorsModel; setColor(0); - setStyleSheet(""); setAutoFillBackground(true); connect(m_colorsModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(dataChanged(QModelIndex,QModelIndex))); @@ -30,9 +30,12 @@ QStandardItem * item = m_colorsModel->item(m_color); + setStyleSheet(QString("border: 2px solid orange; border-radius: 8px; background: %1").arg(item->data().value().name())); + /* QPalette p = palette(); p.setColor(QPalette::Window, item->data().value()); setPalette(p); + */ emit colorChanged(m_color); }