I currently have code that sets a widgets background to a desired image. However, by default it is tiling the image. I'm trying to make it so that it does not repeat. I was able to use CSS stylesheet's to do this, but it ended up lagging my program on load. Therefore, I decided to use a different method. Below is the code I have so far, and if anyone can help me figure out how to make it not repeat the image, I would appreciate it:

Qt Code:
  1. QPalette p = this->palette();
  2. p.setBrush(QPalette::Window, QPixmap(QString(":imageLocation")));
  3. this->setPalette(p);
  4. this->setAutoFillBackground(true);
To copy to clipboard, switch view to plain text mode