Screenshot from a component in qml
-
hello,i want to have a screen shot of a component as a picture...for example i have a text and an image in one rectangle and i want a picture from that rectangle including that picture and text...
please don't tell me about general screen shot...this question is just about one component....
can u help me?
thanks... -
Hi there,
have you managed to achieve what you were asking ?
I need exactly the same.Thanks a lot,
Ben
-
Hi there,
have you managed to achieve what you were asking ?
I need exactly the same.Thanks a lot,
Ben
-
C++: "QQuickItem::grabToImage()":http://doc.qt.io/qt-5/qquickitem.html#grabToImage
QML: "grabToImage()":http://doc.qt.io/qt-5/qml-qtquick-item.html#grabToImage-methodNote: These methods are available since Qt 5.4.
In case you want to save the image to a file the "docs are wrong":https://bugreports.qt.io/browse/QTBUG-43406
Instead of calling save() on the result object you need to call saveToFile() -
C++: "QQuickItem::grabToImage()":http://doc.qt.io/qt-5/qquickitem.html#grabToImage
QML: "grabToImage()":http://doc.qt.io/qt-5/qml-qtquick-item.html#grabToImage-methodNote: These methods are available since Qt 5.4.
In case you want to save the image to a file the "docs are wrong":https://bugreports.qt.io/browse/QTBUG-43406
Instead of calling save() on the result object you need to call saveToFile()