Home qt How do I add a background to a QWidget?

How do I add a background to a QWidget?

Author

Date

Category

 enter image description here I wanted to make a background in QWidget.
Added to stylesheet:

QWidget {
    background: url("./image/layer.png");
} 

Got the brakes. CPU utilization 100%. How can this be?

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions