/** void QWidget::textSize(const char *text) * bind/QWidget.h:55 */ static int TableView_textSize(lua_State *L) { try { TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView")); const char *text = dub_checkstring(L, 2); lua_pushnumber(L, self->fontMetrics().width(text)); lua_pushnumber(L, self->fontMetrics().height()); return 2; } catch (std::exception &e) { lua_pushfstring(L, "textSize: %s", e.what()); } catch (...) { lua_pushfstring(L, "textSize: Unknown exception"); } return dub_error(L); }