This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Saving addon specific custom data

Tags: None
(comma "," separated)
User avatar
rksk16it
Registered Member
Posts
21
Karma
0
OS

Saving addon specific custom data

Mon Sep 16, 2019 11:13 am
I was looking through the docs and source, but cannot find anything about saving some custom data which is specific to my addon along with the file. The data can be document specific, or maybe even node specific. It can be binary or non-binary like json/xml.

Though I can achieve this by hacky methods, like storing the data in the node name by encoding it into some non-binary format (say base64). Or I can save it in a separate paint layer as its pixel data. For documents, I can probably save it in its filename if its small, or utilize the above node specific methods with a specific node name used only to store document specific data, hardcoded in the addon.

Qt provides API to set dynamic properties on any QObject, but afaik by skimming the code, they are not saved into the file (I could be wrong, I didnt look very thoroughly). So I wanted to ask if there is any standard way to do that which I might have overlooked ?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]