[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Storing images in KConfig keys
From:       Stefan Majewsky <majewsky () gmx ! net>
Date:       2009-10-11 20:15:07
Message-ID: 200910112215.14726.majewsky () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi,

I'll keep it short: What is the recommended way to store an image in a KConfig 
key? I've already found ways, such as:

QBuffer buffer;
image.save(&buffer, "PNG");
configGroup.writeEntry("Thumbnail", buffer.data());
...
QImage image;
image.loadFromData(configGroup.readEntry("Thumbnail", QByteArray()));

But this stuff is quite ugly and might have some shortcomings which I do not 
see yet. As this is already the second time I need to do such operations (I'm 
regularly using KConfig as a file format because it behaves very well in 
conjunction with QVariants), I'm wondering whether functionality to save 
images could be inserted into KConfig.

Greetings
Stefan

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic