Make MsgId work properly with QVariant