setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0.497297, y1:0.006, x2:0.498, y2:1, stop:0 rgba(207, 207, 207, 255), stop:0.497297 rgba(239, 239, 239, 255), stop:0.967568 rgba(207, 207, 207, 255));"));
Product_Label_New::Product_Label_New(QWidget *parent, QString p_name, QString p_id) : QPushButton(parent){ product_name = p_name; product_id = p_id; //QPalette pal = this->palette(); //pal.setColor(QPalette::Background,QColor(255,255,255,0)); //this->setPalette(pal); this->setStyleSheet("background-color: rgba(0,0,0,0);"); resize(397,287); this->setFixedSize(397,287); this->setMinimumSize(397,287); this->setStyleSheet("margin: 0px;"); this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); QImage image(":/images/fon_product.png"); if (!image.isNull()) { QImage img1 = image.scaled(QSize(397,287),Qt::IgnoreAspectRatio,Qt::SmoothTransformation); QIcon icon; icon.addPixmap (QPixmap::fromImage(img1), QIcon::Normal, QIcon::Off); setIcon(icon); setIconSize(QSize(397,287)); } QGridLayout *mainlayout = new QGridLayout(this); QLabel *lbl = new QLabel(this); lbl->setText("Текст"); lbl->setStyleSheet("color: #f40000;"); lbl->setFont(QFont("Arial",13,QFont::Bold)); lbl->move(40,20);/*У этой метки стоит градиент, как у верхнего виджета :(*/....
*#product_class { ...}
#product_class { ...}