Use QMetaType API directly instead of going through QVariant.