예제 #1
0
static int 
qsvgrenderer_hook(lua_State *L)
{
  lua_getfield(L, -1, "__metatable");
  luaQ_register(L, qsvgrenderer_lib, QCoreApplication::instance());
  return 0;
}
예제 #2
0
LUA_EXTERNC QTUILOADER_API int
luaopen_libqtuiloader(lua_State *L)
{
  // load module 'qt'
  if (luaL_dostring(L, "require 'qt'"))
    lua_error(L);
  // enrichs class QUiLoader.
  luaQ_pushmeta(L, &QUiLoader::staticMetaObject);
  luaQ_getfield(L, -1, "__metatable");
  luaQ_register(L, qtuiloader_lib, QCoreApplication::instance());
  return 0;
}
예제 #3
0
파일: qtluautils.cpp 프로젝트: elq/torch5
static int qobject_hook(lua_State *L) 
{
  lua_getfield(L, -1, "__metatable");
  luaQ_register(L, qobject_lib, 0);
  return 0;
}