QPalette pal = palette(); pal.setBrush(QPalette::Window, QBrush(QPixmap( ":/images/bg1.png"))); setPalette(pal);
paintEvent(QPaintEvent *evt){ QPainter painter(this); painter.drawPixmap(rect(), QPixmap(":/pictures/icon.png"));}
QWidget { background-image: url(:/images/bg1.png);}
QLabel *label1 = new QLabel("Text 1");QLabel *label2 = new QLabel("Text 2");QLayout *layout = new QHBoxLayout();layout->addWidget(label1);layout->addWidget(label2);ui.label->setLayout(layout);