Skip to content

Commit 893bc25

Browse files
committed
BUG: Fix Qt >= 6.9 QCheckBox stateChanged -> checkStateChanged
1 parent 21f4f42 commit 893bc25

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Libs/DICOM/Widgets/ctkDICOMServerNodeWidget2.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,13 @@ void ctkDICOMServerNodeWidget2Private::init()
354354

355355
q->readSettings();
356356

357+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
358+
QObject::connect(this->StorageEnabledCheckBox, &QCheckBox::checkStateChanged,
359+
q, &ctkDICOMServerNodeWidget2::onSettingsModified);
360+
#else
357361
QObject::connect(this->StorageEnabledCheckBox, SIGNAL(stateChanged(int)),
358362
q, SLOT(onSettingsModified()));
363+
#endif
359364
QObject::connect(this->StorageAETitle, SIGNAL(textChanged(QString)),
360365
q, SLOT(onSettingsModified()));
361366
QObject::connect(this->StoragePort, SIGNAL(textChanged(QString)),

Libs/Widgets/ctkModalityWidget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ void ctkModalityWidgetPrivate::init()
8787
this->setupUi(q);
8888

8989
this->AnyCheckBox->setTristate(true);
90+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
91+
QObject::connect(this->AnyCheckBox, &QCheckBox::checkStateChanged,
92+
q, &ctkModalityWidget::onAnyChanged);
93+
#else
9094
QObject::connect(this->AnyCheckBox, SIGNAL(stateChanged(int)),
9195
q, SLOT(onAnyChanged(int)));
96+
#endif
9297

9398
foreach(QCheckBox* modalityBox, q->findChildren<QCheckBox*>())
9499
{

0 commit comments

Comments
 (0)