From 10d05b4cbcc4e9f40caca5edf9aa01b0ba3f3abe Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Mon, 6 Dec 2021 12:39:14 +0100 Subject: [PATCH] Qt6: Replace QVariant::Type with QMetaType --- src/library/bpmdelegate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/library/bpmdelegate.cpp b/src/library/bpmdelegate.cpp index 4a3012a302c1..1b311c287d58 100644 --- a/src/library/bpmdelegate.cpp +++ b/src/library/bpmdelegate.cpp @@ -48,7 +48,11 @@ BPMDelegate::BPMDelegate(QTableView* pTableView) // Register a custom QItemEditorFactory to override the default // QDoubleSpinBox editor. m_pFactory = new QItemEditorFactory(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + m_pFactory->registerEditor(QMetaType::Double, new BpmEditorCreator()); +#else m_pFactory->registerEditor(QVariant::Double, new BpmEditorCreator()); +#endif setItemEditorFactory(m_pFactory); }