Always allow setting a null binding on a property
This should always work to allow clearing a binding. Change-Id: I55165a50f7fe62a1f8a5078d452968db09a6d360 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
b788c64dc3
commit
af149ada60
@ -407,7 +407,7 @@ public:
|
||||
|
||||
bool setBinding(const QUntypedPropertyBinding &newBinding)
|
||||
{
|
||||
if (newBinding.valueMetaType().id() != qMetaTypeId<T>())
|
||||
if (!newBinding.isNull() && newBinding.valueMetaType().id() != qMetaTypeId<T>())
|
||||
return false;
|
||||
setBinding(static_cast<const QPropertyBinding<T> &>(newBinding));
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user