I have a paintEvent and I'm adding the background everytime I paint something, the problem is that I need the image to stop repeating.
For example if my background image is 20pixels x 20 pixels, and my paint area is 40pixels x 40pixels, the background is 4 images, and i need only one.
Here is my code.
1. QPainter painter; // painter for the canvas
2. painter.begin(this);
3. QPixmap backgroundImage;
4. backgroundImage.load("multimedia/monitor_image.png");
5. painter.fillRect(event->rect(), QBrush(backgroundImage));
Thanks for the help!