Qt 6.11 is out! See what's new in the release
blog
How to use qml to cut a part of one picture?
QML and Qt Quick
6
Posts
3
Posters
5.0k
Views
1
Watching
-
Hi sfjam, i'm sorry, but there is no direct way to do this. I'm not familiar with image editing, but i think maybe there are 2 ways to make it.
The first approach is: Use QPixmap::grabWidget() to grab your picture which been cut inside the QWidget's paintEvent, and display it in your QML view or save the pixmap to file.
Another one is: use lowlevel api's to manipulate the picture's data, cut, chop, rotate or do everything you like.
But all of them are not done by QML(Even you can create a QML plugin)
Br,
-