example: Allow to demo the focus scope

set KDDW_DEBUG_FOCUS
This commit is contained in:
Sergio Martins
2020-09-04 17:06:32 +01:00
parent 7c5e159677
commit 6b28a804f8

View File

@@ -36,13 +36,13 @@ MyWidget::MyWidget(const QString &backgroundFile, const QString &logoFile, QWidg
}
setFocusPolicy(Qt::StrongFocus);
#if 0
// Uncomment to show focus propagation working
new QLineEdit(this);
auto l2 = new QLineEdit(this);
l2->move(0, 100);
setFocusProxy(l2);
#endif
if (qEnvironmentVariableIsSet("KDDW_DEBUG_FOCUS")) {
// Uncomment to show focus propagation working
new QLineEdit(this);
auto l2 = new QLineEdit(this);
l2->move(0, 100);
setFocusProxy(l2);
}
}
MyWidget::~MyWidget()