diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-01-19 14:21:33 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-01-20 16:09:57 +0100 |
commit | 36a9594bce7b6e0be22446734dede93a31e95ed3 (patch) | |
tree | 925d95de0cc7fffaf6433ea4239b2a135804efae /src/libs/installer/component.cpp | |
parent | 1b632baad6090403da17cdde411bf7fa511b1da2 (diff) |
Make sure widgets from .ui files are properly registered to engine
Make the QWidget representing a UI file known to the engine, so that
e.g. child objects can be always accessed :
component.userInterface("RegisterFileCheckBoxForm").RegisterFileCheckBox.checked;
This worked reliably only if the .ui file has been shown to the user,
which might not always been the case.
Change-Id: I7a87773e29f6210ab7160d8e33c41f6ebeeb82d6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r-- | src/libs/installer/component.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 494e61dbd..86388cc2e 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -584,6 +584,7 @@ void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis throw Error(tr("Could not load the requested UI file '%1'. Error: %2").arg(it.fileName(), loader.errorString())); } + d->scriptEngine()->newQObject(widget); d->m_userInterfaces.insert(widget->objectName(), widget); } } |