summaryrefslogtreecommitdiffstats
path: root/PySide/QtUiTools/typesystem_uitools.xml
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-06 18:55:42 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-07 12:18:31 -0300
commit24cbdd8dfa3cd01184d0dae297c15547d4962293 (patch)
treea1afafc9b9dc216e6e62a4529a4cf0c1fa5cc71d /PySide/QtUiTools/typesystem_uitools.xml
parent83533ddc5d89feb046863b4dacc86be3967e4a6b (diff)
downloadpyside-24cbdd8dfa3cd01184d0dae297c15547d4962293.tar.gz
pyside-24cbdd8dfa3cd01184d0dae297c15547d4962293.tar.xz
pyside-24cbdd8dfa3cd01184d0dae297c15547d4962293.zip
Created uiloader plugin used to register new types before QUiLoader.
This is used to register a new python type which can be used in ui description files. Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide/QtUiTools/typesystem_uitools.xml')
-rw-r--r--PySide/QtUiTools/typesystem_uitools.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/PySide/QtUiTools/typesystem_uitools.xml b/PySide/QtUiTools/typesystem_uitools.xml
index a188aa3..0abc695 100644
--- a/PySide/QtUiTools/typesystem_uitools.xml
+++ b/PySide/QtUiTools/typesystem_uitools.xml
@@ -23,6 +23,18 @@
<load-typesystem name="typesystem_xml.xml" generate="no" />
<object-type name="QUiLoader">
+ <extra-includes>
+ <include file-name="glue/plugins.h" location="local"/>
+ </extra-includes>
+ <inject-code>
+ Q_IMPORT_PLUGIN(uiplugin);
+ </inject-code>
+ <add-function signature="registerCustomWidget(PyObject*)" return-type="void">
+ <inject-code class="target" position="beginning">
+ registerCustomWidget(%PYARG_1);
+ %CPPSELF.addPluginPath(""); // force reload widgets
+ </inject-code>
+ </add-function>
<modify-function signature="createAction(QObject *, const QString&amp;)">
<modify-argument index="return">
<parent index="1" action="add"/>