46 if (!variant.isValid ())
47 throw std::runtime_error {
"Invalid variant." };
49 const auto type = variant.userType ();
51 if (type < static_cast<int> (QVariant::UserType))
52 return { {
"data", variant } };
54 if (Intros_.contains (type))
55 return Intros_ [type] (variant);
57 qWarning () << Q_FUNC_INFO
58 <<
"unregistered type" 61 throw std::runtime_error {
"Unregistered type: " + std::to_string (type) };
static Introspectable & Instance()
QVariantMap operator()(const T &t) const