PDA

View Full Version : widget's border-image is placed(repeated) on QPushButton as well.



dkj5
2nd April 2013, 10:48
The following is the qt code which not preducing desired result.
I don't want to have parent widget's Border-image on the QPushButton.


QWidget *widget = new QWidget();

widget->setStyleSheet("border-image: url(sea_shore.jpeg);");


QGridLayout *glayout = new QGridLayout();

QIcon icon(pm);

setWindowTitle("Testing...");
setFixedSize(650, 400);
setCentralWidget(widget);
widget->setLayout(glayout);

QPushButton *button = new QPushButton(QIcon("designer.png"), NULL, this);
button->setFixedSize(125, 50);
button->setIconSize(button->rect().size());
button->setFlat(TRUE);


Kindly give suggestions.