TYPE luaQ_checkqvariant<TYPE>(lua_State *L, int index)
This function causes an error if the Lua value at position index
in the stack cannot be converted to
Qt variant of actual type TYPE
.
Otherwise it returns a value of the requested type.
The C++ type TYPE
must be known to the Qt meta type system.
This can always be achieved using the macro
Q_DECLARE_METATYPE
.