Hi, thank you for the response!
Unfortunately, when I try to save a QList<MyStruct>, I get the following error at runtime:
QVariant::save: unable to save type 'QList<Action>' (type id: 1032).
ASSERT failure in QVariant::save: "Invalid type to save", file kernel\qvariant.cpp, line 2124
Invalid parameter passed to C runtime function.
This is even though I have (after some wrestling) managed to successfully save a Action (MyStruct) using QVariant::fromValue(), having registered both Action as a metatype as well as its operators in main():
qRegisterMetaType<Action>("Action");
qRegisterMetaTypeStreamOperators<Action>("Action");
Any idea why that might be?
edit: A-ha! For future reference, it isn't needed to create custom operators for QList<MyStruct>, but it's still required to call qRegisterMetaTypeStreamOperators() on QList<MyStruct>. Solved!