예제 #1
0
/** void QWidget::setStyleSheet(const char *text)
 * bind/QWidget.h:52
 */
static int TableView_setStyleSheet(lua_State *L) {
  try {
    TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView"));
    const char *text = dub_checkstring(L, 2);
    self->setStyleSheet(text);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setStyleSheet: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setStyleSheet: Unknown exception");
  }
  return dub_error(L);
}
예제 #2
0
/** void QWidget::setStyle(const char *text)
 * bind/QWidget.h:51
 */
static int TableView_setStyle(lua_State *L) {
  try {
    TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView"));
    const char *text = dub_checkstring(L, 2);
    self->setStyleSheet(QString("%1 { %2 }").arg(self->metaObject()->className()).arg(text));
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setStyle: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setStyle: Unknown exception");
  }
  return dub_error(L);
}