/** LuaStackSize QWidget::size() * bind/QWidget.h:50 */ static int LineEdit_size(lua_State *L) { try { LineEdit *self = *((LineEdit **)dub_checksdata(L, 1, "mimas.LineEdit")); QRect rect = self->geometry(); lua_pushnumber(L, rect.width()); lua_pushnumber(L, rect.height()); return 2; } catch (std::exception &e) { lua_pushfstring(L, "size: %s", e.what()); } catch (...) { lua_pushfstring(L, "size: Unknown exception"); } return dub_error(L); }