diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 6566ad6e59..ef9a2a15de 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -1381,12 +1381,16 @@ void PropertyBoolItem::setValue(const QVariant& value) } QWidget* PropertyBoolItem::createEditor(QWidget* parent, - const std::function& /*method*/, + const std::function& method, FrameOption /*frameOption*/) const { - // The checkbox is basically artificial (it is not rendered). Other code handles the callback, - // etc. auto checkbox = new QCheckBox(parent); +#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) + QObject::connect(checkbox, &QCheckBox::stateChanged, method); +#else + QObject::connect(checkbox, &QCheckBox::checkStateChanged, method); +#endif + return checkbox; } diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index 7b1116fbd6..02dc928911 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -187,10 +187,6 @@ bool PropertyItemDelegate::eventFilter(QObject *o, QEvent *ev) auto parentEditor = qobject_cast(this->parent()); if (parentEditor && parentEditor->activeEditor == checkBox) { checkBox->toggle(); - // Delay valueChanged to ensure proper recomputation - QTimer::singleShot(0, this, [this]() { - valueChanged(); - }); } } }