example: Add some helper code to debug focus
This commit is contained in:
committed by
Sergio Martins
parent
0b4c017f22
commit
c9468bef8a
@@ -217,6 +217,13 @@ void DockWidgetBase::setWidget(QWidgetOrQuick *w)
|
||||
|
||||
d->widget = w;
|
||||
setSizePolicy(w->sizePolicy());
|
||||
|
||||
if (w->focusPolicy() == Qt::NoFocus) {
|
||||
setFocusProxy(nullptr);
|
||||
} else {
|
||||
setFocusProxy(w);
|
||||
}
|
||||
|
||||
Q_EMIT widgetChanged(w);
|
||||
setWindowTitle(uniqueName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user