[Qt-interest] Storing Qt properties to file
Schimkowitsch Robert
Robert.Schimkowitsch at andritz.com
Mon Sep 26 13:47:16 CEST 2011
The format has to be XML, and I have to be able to control the format
used. Therefore, no QSettings possible.
Kind regards
Robert Schimkowitsch
-----Original Message-----
From: qt-interest-bounces+robert.schimkowitsch=andritz.com at qt.nokia.com
[mailto:qt-interest-bounces+robert.schimkowitsch=andritz.com at qt.nokia.co
m] On Behalf Of Dan White
Sent: Monday, September 26, 2011 1:41 PM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Storing Qt properties to file
Have you looked at Qsettings ?
http://doc.qt.nokia.com/latest/qsettings.html#accessing-ini-and-plist-fi
les-directly
"Sometimes I think the surest sign that intelligent life exists
elsewhere in the universe is that none of it has tried to contact us."
Bill Waterson (Calvin & Hobbes)
----- Schimkowitsch Robert <Robert.Schimkowitsch at andritz.com> wrote:
> Hi,
>
> I want to be able to write the properties of my object to file in a
> locale-independent way, and be able to restore the object using that
> stored information later on.
>
> Before I start reinventing the wheel, I'd like to know whether
something
> like this already exists (I couldn't find it, but then again Qt has
> grown big).
>
> My plan includes the following steps. If you happen to know existing
> classes or samples that cover those steps, please let me know!
>
> 1) Read and write QVariant: Handling of basic data types (float is a
bit
> tricky, unicode strings might be)
> 2) Write a reader and writer that writes all Q_PROPERTIES of an object
> to an XML file, and reads them again, restoring the object properties.
> By using propertyOffset() of QMetaObject, I should be able to filter
out
> base class properties that should not be saved and restored.
> 3) Define the needed properties in my objects, and call the
> reader/writer
>
> Kind regards
>
> Robert Schimkowitsch
>
>
########################################################################
#############
> This message and any attachments are solely for the use of the
intended recipients. They may contain privileged and/or confidential
information or other information protected from disclosure. If you are
not an intended recipient, you are hereby notified that you received
this email in error and that any review, dissemination, distribution or
copying of this email and any attachment is strictly prohibited. If you
have received this email in error, please contact the sender and delete
the message and any attachment from your system.
> Thank You.
> ANDRITZ HYDRO GmbH
> Rechtsform/ Legal form: Gesellschaft mit beschrankter Haftung /
Corporation
> Firmensitz/ Registered seat: Wien
> Firmenbuchgericht/ Court of registry: Handelsgericht Wien
> Firmenbuchnummer/ Company registration: FN 61833 g
> DVR: 0605077
> UID-Nr.: ATU14756806
>
########################################################################
#############
>
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
#####################################################################################
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
Thank You.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschrankter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
DVR: 0605077
UID-Nr.: ATU14756806
#####################################################################################
More information about the Qt-interest-old
mailing list