Saving image to QSettings from QML
-
I'm using QSettings for storing user settings locally. QSettings are exposed to QML via wrapper:
http://developer.qt.nokia.com/forums/viewthread/11696/QSettings support QImage as an argument for saving setting. How I can save image to QSettings from QML? Providing Image element returns me error:
QVariant::save: unable to save type 136.
-
-
Yes, I basically wonder if it is possible to construct QImage from QML and save it to QSettings?
-
Doing some experiments by capturing image with Camera and trying to save it into Settings.
@Camera {
id: camera
x: 0
y: 0
anchors.fill: parent
focus: visible //to receive focus and capture key events
captureResolution : "640x480"flashMode: Camera.FlashAuto whiteBalanceMode: Camera.WhiteBalanceAuto onImageCaptured : { captureButton.text = "Captured" image1.source = preview text1.text = preview Settings.setValue("image", preview) }@
Getting this:
[Qt Message] QVariant::load: unable to load type 136.
[Qt Message] QVariant::save: unable to save type 136.I guess I have to implement some sort of image handler in C++ side for saving captured images.
-
How about if I need to create QImage from QML Image element? Same thing like discussed here but backwards? I'm currently capturing image with QML Camera, and would like to save it somehow.
-
[quote author="strekazoid" date="1321969152"]How about if I need to create QImage from QML Image element? Same thing like discussed here but backwards? I'm currently capturing image with QML Camera, and would like to save it somehow.[/quote]
I have moved the message above from "this old topic":http://developer.qt.nokia.com/forums/viewthread/11832/ to here. Strekazoid, please confine the discussion of your issue to a single topic. You already have multiple topics open on different aspects of this same issue. Posting in even more topics, even if they are related, doesn't help.
-
bq. Posting in even more topics, even if they are related, doesn’t help.
Agree :D