Reputation: 715
How can I simply set background of my QDialog? I can easily set colour of background, but when i try use image, my background just goes black. I was trying to use: QPallete with QBrush, StyleSheets :(.
Upvotes: 0
Views: 3716
Reputation: 2832
You can simply
MyDialog::MyDialog(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
setStyleSheet( "background-image:url(image.jpg);" ); //this works
}
See also: Unable to set the background image in Qt Stylesheet
Upvotes: 1