Updated the custom widget plugin to use the new converters.
This commit is contained in:
parent
7bfbbf3cb7
commit
2a634aea05
2 changed files with 6 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ set(ui_plugin_src
|
||||||
customwidget.cpp
|
customwidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set (ui_plugin_moc
|
set(ui_plugin_moc
|
||||||
customwidget.h
|
customwidget.h
|
||||||
customwidgets.h
|
customwidgets.h
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -95,11 +95,12 @@ QWidget* PyCustomWidget::createWidget(QWidget* parent)
|
||||||
bool unkowParent = false;
|
bool unkowParent = false;
|
||||||
if (parent) {
|
if (parent) {
|
||||||
pyParent = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(parent));
|
pyParent = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(parent));
|
||||||
if (!pyParent) {
|
if (pyParent) {
|
||||||
pyParent = Shiboken::Converter<QWidget*>::toPython(parent);
|
|
||||||
unkowParent = true;
|
|
||||||
} else {
|
|
||||||
Py_INCREF(pyParent);
|
Py_INCREF(pyParent);
|
||||||
|
} else {
|
||||||
|
static Shiboken::Conversions::SpecificConverter converter("QWidget*");
|
||||||
|
pyParent = converter.toPython(&parent);
|
||||||
|
unkowParent = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
|
|
@ -129,4 +130,3 @@ void PyCustomWidget::initialize(QDesignerFormEditorInterface* core)
|
||||||
{
|
{
|
||||||
m_data->initialized = true;
|
m_data->initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue