QCustomPlot Discussion and Comments

Support Qt 6.2Return to overview

Hello. I faced such a problem that the working program does not compile in Qt 6.2.

C:\Program1\apsa\build\debug\indication\moc_qcustomplot.cpp:249: error: template argument 1 is invalid
..\..\build\debug\indication\moc_qcustomplot.cpp:249:54: error: template argument 1 is invalid
, QtPrivate::TypeAndForceComplete<QCP, std::true_type>
^

Please tell me when full support will appear?

https://ibb.co/K7YFTtS
https://ibb.co/SmbH9wd

Qt6.2 isn't released yet, so I guess not until then :)

why this error?
Qt 5.15

249 | , QtPrivate::TypeAndForceComplete<QCP, std::true_type>

the same issue

I am facing the same problem. It does not compile with Qt 6.2

Same here... I don't know how to fix it... help!!!

Same issue! Please help!

The same problem has appeared. Is there any solution?

I have faced the same problem. Please help!

HI there,
I'm facing the exact same issue. Anyone solved this issue ?
thank you very much for your help.
Olivier

Same issue on 6.0.2


debug\moc_qcustomplot.cpp:249:54: error: template argument 1 is invalid
249 | , QtPrivate::TypeAndForceComplete<QCP, std::true_type>
| ^
debug\moc_qcustomplot.cpp:248:1: error: template argument 2 is invalid
248 | qt_incomplete_metaTypeArray<qt_meta_stringdata_QCP_t
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249 | , QtPrivate::TypeAndForceComplete<QCP, std::true_type>
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi, same issue on 6.2.2. Did anyone found the solution?

Hi guys,I have the same problem

Qt version 6.2.3

When i update to QtPrivate::TypeAndForceComplete<int, std::true_type>, compile pass

-------------------------------------
I didn't find a template for it

qt_incomplete_metaTypeArray<qt_meta_stringdata_Object_t
, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>
, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>
, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<const int &, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<const int &, std::false_type>
, QtPrivate::TypeAndForceComplete<QString, std::false_type>, QtPrivate::TypeAndForceComplete<QObject *, std::false_type>, QtPrivate::TypeAndForceComplete<QString, std::false_type>
>,
-------------------------------

It's supposed to be a temporary fix

If you compile successfully, please give me a thumbs up

I changed these lines in qcustomplot.h

#ifndef Q_MOC_RUN
namespace QCP {
#else
class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q_ENUMS/Q_FLAGS features in namespace
Q_GADGET
Q_ENUMS(ExportPen)
Q_ENUMS(ResolutionUnit)
Q_ENUMS(SignDomain)
Q_ENUMS(MarginSide)
Q_FLAGS(MarginSides)
Q_ENUMS(AntialiasedElement)
Q_FLAGS(AntialiasedElements)
Q_ENUMS(PlottingHint)
Q_FLAGS(PlottingHints)
Q_ENUMS(Interaction)
Q_FLAGS(Interactions)
Q_ENUMS(SelectionRectMode)
Q_ENUMS(SelectionType)
public:
#endif

to this

namespace QCP {

Thank you colzlor ! it worked. You are the best.

FYI, QCP 2.1.1 establishes compatibility up to Qt6.4;
Thanks for the discussions here!