本文整理汇总了C++中JsModuleUiV8QtBasic::create_v8_qwidget方法的典型用法代码示例。如果您正苦于以下问题:C++ JsModuleUiV8QtBasic::create_v8_qwidget方法的具体用法?C++ JsModuleUiV8QtBasic::create_v8_qwidget怎么用?C++ JsModuleUiV8QtBasic::create_v8_qwidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsModuleUiV8QtBasic
的用法示例。
在下文中一共展示了JsModuleUiV8QtBasic::create_v8_qwidget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
dmz::V8Value
dmz::JsModuleUiV8QtBasic::_create_message_box (const v8::Arguments &Args) {
v8::HandleScope scope;
V8Value result = v8::Undefined ();
JsModuleUiV8QtBasic *self = _to_self (Args);
if (self) {
QWidget *parent = 0;
V8Object params = v8_to_object (Args[0]);
if (Args.Length () >= 2) {
parent = self->_to_qwidget (Args[1]);
}
if (!params.IsEmpty ()) {
QMessageBox *dialog = self->_create_message_box (params, parent);
result = self->create_v8_qwidget (dialog);
}
}
return scope.Close (result);
}
示例2:
dmz::V8Value
dmz::JsModuleUiV8QtBasic::_tree_item_widget (const v8::Arguments &Args) {
v8::HandleScope scope;
V8Value result = v8::Undefined ();
JsModuleUiV8QtBasic *self = _to_self (Args);
if (self) {
QTreeWidget *tree = self->v8_to_qobject<QTreeWidget> (Args.This ());
if (tree) {
if (Args.Length () > 1) {
QTreeWidgetItem *item = self->_to_qtreewidgetitem (Args[0]);
int col = v8_to_uint32 (Args[1]);
if (item) {
if (Args.Length () > 2) {
tree->setItemWidget (item, col, self->_to_qwidget (Args[2]));
}
result = self->create_v8_qwidget (tree->itemWidget (item, col));
}
}
}
}
return scope.Close (result);
}
示例3:
dmz::V8Value
dmz::JsModuleUiV8QtBasic::_layout_at (const v8::Arguments &Args) {
v8::HandleScope scope;
V8Value result = v8::Undefined ();
JsModuleUiV8QtBasic *self = _to_self (Args);
if (self) {
QLayout *layout = self->v8_to_qobject<QLayout> (Args.This ());
if (layout) {
if (Args.Length () > 0) {
QWidget *widget = layout->itemAt (v8_to_int32 (Args[0]))->widget ();
if (widget) {
result = self->create_v8_qwidget (widget);
}
}
}
}
return scope.Close (result);
}