Commit 32d6f80e5b0ef37b545a1f5c3c9e2ac46b4abf93

Authored by Josh Klontz
1 parent 61381efe

workaround for cv::Mat properties

Showing 1 changed file with 5 additions and 0 deletions
openbr/openbr_plugin.cpp
@@ -1118,6 +1118,11 @@ void Object::setProperty(const QString &name, QVariant value) @@ -1118,6 +1118,11 @@ void Object::setProperty(const QString &name, QVariant value)
1118 if (value.isNull()) value = true; 1118 if (value.isNull()) value = true;
1119 else if (value == "false") value = false; 1119 else if (value == "false") value = false;
1120 else if (value == "true") value = true; 1120 else if (value == "true") value = true;
  1121 + } else if (type == "cv::Mat") {
  1122 + if (value.toString().isEmpty())
  1123 + value.setValue(cv::Mat());
  1124 + else
  1125 + qFatal("QString to cv::Mat not implemented!");
1121 } 1126 }
1122 1127
1123 if (!QObject::setProperty(qPrintable(name), value) && !type.isEmpty()) 1128 if (!QObject::setProperty(qPrintable(name), value) && !type.isEmpty())