I was investigating Qt docs regarding QPixmap how to set image pixmap properly (https://doc.qt.io/qt-5/qpixmap.html#scaled, etc.).
I was experimenting with different kinds of setting pixmap to a QGraphicItem but none of them seemed natural:
Using the following line of code (and its parameters variations), but I was not able to get results I want:
this->mPixmap = QPixmap(path).scaled(mRect.width(), mRect.height(), Qt::KeepAspectRatioByExpanding);
Is there any way I can set pixmap so it would be "repeated" on the object with kept aspect ratio, so it would look n the item like this?
Thank you for any kind of help.


