QCustomPlot Discussion and Comments

Setting Up QCustomPlot with QtCreator /qmake fails Return to overview

I have been using QCustomPlot for a while, its worked great
Recently had to update to new machine and new version of QT Creator 7.02 version ac1e86fe74
with MSVC2019 compiler
I just cannot replicate the setting up as shown in the tutorial, build produces 19 errors
Is there anybody else who might have had the same issues and found a workaround
I am unable to compile with qcustomplot.h and .cpp., though I can produce UI with standard widgets
what could the QT configuration missing

Thank you
drsam10022@gmail.com

ERRORS

C:\QT projects2\qcustomplot\examples\build-interaction-example-Desktop_Qt_6_3_0_MSVC2019_64bit-Debug\debug\moc_qcustomplot.cpp:249: error: C2882: 'QCP': illegal use of namespace identifier in expression
C:\QT projects2\qcustomplot\examples\build-interaction-example-Desktop_Qt_6_3_0_MSVC2019_64bit-Debug\debug\moc_qcustomplot.cpp:249: error: C2974: 'QtPrivate::TypeAndForceComplete': invalid template argument for 'T', type expected
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2479): note: see declaration of 'QtPrivate::TypeAndForceComplete'
C:\QT projects2\qcustomplot\examples\build-interaction-example-Desktop_Qt_6_3_0_MSVC2019_64bit-Debug\debug\moc_qcustomplot.cpp:249: error: C3203: 'TypeAndForceComplete': unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2487: error: C2825: 'TypeCompletePair': must be a class or namespace when followed by '::'
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2537): note: see reference to function template instantiation 'const QtPrivate::QMetaTypeInterface *QtPrivate::qTryMetaTypeInterfaceForType<Unique,int>(void)' being compiled
with
[
Unique=qt_meta_stringdata_QCP_t
]
debug\moc_qcustomplot.cpp(248): note: see reference to variable template 'const QtPrivate::QMetaTypeInterface *const qt_incomplete_metaTypeArray<qt_meta_stringdata_QCP_t,int>[1]' being compiled
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2487: error: C2510: 'TypeCompletePair': left of '::' must be a class/struct/union
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2487: error: C2061: syntax error: identifier 'type'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2488: error: C2825: 'TypeCompletePair': must be a class or namespace when followed by '::'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2488: error: C2510: 'TypeCompletePair': left of '::' must be a class/struct/union
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2488: error: C2061: syntax error: identifier 'ForceComplete'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2489: error: C2065: 'T': undeclared identifier
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2489: error: C2923: 'std::remove_reference_t': 'T' is not a valid template type argument for parameter '_Ty'
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2489): note: see declaration of 'T'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2955: 'QtPrivate::is_complete': use of class template requires template argument list
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2457): note: see declaration of 'QtPrivate::is_complete'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2039: 'value': is not a member of 'QtPrivate::is_complete<T,ODR_VIOLATION_PREVENTER>'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2065: 'value': undeclared identifier
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2653: 'ForceComplete': is not a class or namespace name

C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2065: 'value': undeclared identifier
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2491: error: C2131: expression did not evaluate to a constant
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2491): note: a non-constant (sub-)expression was encountered
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2494: error: C2955: 'QtPrivate::QMetaTypeInterfaceWrapper': use of class template requires template argument list
C:\Qt\6.3.0\msvc2019_64\include\QtCore/qmetatype.h(2362): note: see declaration of 'QtPrivate::QMetaTypeInterfaceWrapper'
C:\Qt\6.3.0\msvc2019_64\include\QtCore\qmetatype.h:2537: error: C3615: constexpr function 'QtPrivate::qTryMetaTypeInterfaceForType' cannot result in a constant expression
debug\moc_qcustomplot.cpp(253): note: failure was caused by control reaching the end of a constexpr function

Hi,

I think you should check these posts (https://www.qcustomplot.com/index.php/support/forum/2380). QCustomplot compilation is broken in Qt v6.2