summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/components/buddyeditor/buddyeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src/components/buddyeditor/buddyeditor.cpp')
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
index d35415d9b2..34e1681ef7 100644
--- a/tools/designer/src/components/buddyeditor/buddyeditor.cpp
+++ b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
@@ -51,6 +51,7 @@
#include <qdesigner_utils_p.h>
#include <qlayout_widget_p.h>
#include <connectionedit_p.h>
+#include <metadatabase_p.h>
#include <QtCore/qdebug.h>
#include <QtGui/QLabel>
@@ -75,7 +76,8 @@ static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
if (index != -1) {
bool ok = false;
const Qt::FocusPolicy q = static_cast<Qt::FocusPolicy>(qdesigner_internal::Utils::valueOf(sheet->property(index), &ok));
- return ok && q != Qt::NoFocus;
+ // Refuse No-focus unless the widget is promoted.
+ return (ok && q != Qt::NoFocus) || qdesigner_internal::isPromoted(form->core(), w);
}
}
return false;