My QGraphicsViewelement is much larger than its background image, but I would like this background image to be drawn only once. Now all this is filled with this background image as many times as there is for him.
So, how can I get this background image to be drawn only once in the center of the view?
Here is the code I'm using now:
QPalette palette;
palette.setBrush(this->backgroundRole(),QBrush(*myImage));
this->setPalette(palette);
Thank you for your responses!
source
share