Skip to content

Commit 5e00d3e

Browse files
committed
[Qt] Only use QCheckBox::checkStateChanged on Qt >= 6.7.0
1 parent 9cd0580 commit 5e00d3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

qt/src/hocr/OutputEditorHOCR.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ HOCRAttributeCheckbox::HOCRAttributeCheckbox(Qt::CheckState value, HOCRDocument*
156156
: m_doc(doc), m_itemIndex(itemIndex), m_attrName(attrName), m_attrItemClass(attrItemClass) {
157157
setCheckState(value);
158158
connect(m_doc, &HOCRDocument::itemAttributeChanged, this, &HOCRAttributeCheckbox::updateValue);
159+
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
159160
connect(this, &HOCRAttributeCheckbox::checkStateChanged, this, &HOCRAttributeCheckbox::valueChanged);
161+
#else
162+
connect(this, &HOCRAttributeCheckbox::stateChanged, this, &HOCRAttributeCheckbox::valueChanged);
163+
#endif
160164
}
161165

162166
void HOCRAttributeCheckbox::updateValue(const QModelIndex& itemIndex, const QString& name, const QString& value) {

0 commit comments

Comments
 (0)