[SOLVED] Read/write user settings
-
You haven't included <QtGui/QDeclarativeContext>.
-
Thanks a lot, works now!
-
You're welcome. If the problem has been solved for you feel free to edit your initial post title and prepend "[Solved]" to it to indicate that there is a solution inside.
-
Hey, is there some way to save image to settings? I have path to the image, how do I save it now to Settings?
-
Try this :
@settings.setValue("General/Pixmap", pixmap ); // pxmap is QPixmap@I haven't tried it yet, let me knw whats happening :)
-
Thanks. How do I construct QPixmap in QML?
-
-
I'm still sort of confused. Is it possible to construct QPixmap in QML layer, or do I have to do something on C++ side as well?
-
A request from QML for image/pixmap is handled by the 'Image Provider ' class, in simple words.
Yes you have to implement the Image provider in C++.
-
Ok, thanks, I'll try to play with this idea.
-
Thank you for this excellent post!!
Cheers,
Jon -
Is the wrapper suppose to work out of the box and how do i make it work without qscopedpointer? Thank you
EDIT : Created a proper solution so anyone can answer to help future member