Reputation: 9
For example, if you create a simple plaintextedit, the background is just white. How do I change white background with my own image?
Upvotes: 0
Views: 81
Reputation: 48
In design edit, you can set the styleSheet in properties of QWidget
. In c++ code you can set the background using QSS
, for example, setting
background-image: URL("path/image.png");
:
myWidget->setStyleSheet("background-image: URL('path/image.png')");
Upvotes: 2