21 btn_ul =
new QPushButton(
this);
22 btn_ur =
new QPushButton(
this);
23 btn_ll =
new QPushButton(
this);
24 btn_lr =
new QPushButton(
this);
25 QString style=QString(
"QPushButton:enabled{background-color: rgba(0,0,0,0);border:0px solid;} QPushButton:hover{background-color:rgba(%1,%2,%3,96);}").arg(QString::number(this->palette().highlight().color().red()),QString::number(this->palette().highlight().color().green()),QString::number(this->palette().highlight().color().blue()));
26 btn_ul->setStyleSheet(style);
27 btn_ur->setStyleSheet(style);
28 btn_ll->setStyleSheet(style);
29 btn_lr->setStyleSheet(style);
30 setMinimumSize(60,30);
55 QImage image(2, 2, QImage::Format_ARGB32);
60 QImage gradient = image.scaled(width(),height(),Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
61 setPixmap(QPixmap::fromImage(gradient));
62 btn_ul->setGeometry(0,0,width()/2,height()/2);
63 btn_ur->setGeometry(
btn_ul->width(),0,width()/2,height()/2);
64 btn_ll->setGeometry(0,height()/2,width()/2,height()/2);
65 btn_lr->setGeometry(
btn_ll->width(),height()/2,width()/2,height()/2);
void LR_ColorChanged(QColor color)
void LL_ColorChanged(QColor color)
DialogPreview(QWidget *parent=0)
void UL_ColorChanged(QColor color)
void resizeEvent(QResizeEvent *)
void UR_ColorChanged(QColor color)