Qt6.3.0下使用QCustomPlot 2.1报错的解决方法

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

//extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace

//} // end of namespace QCP
}; // end of namespace QCP
//inline void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
static void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
//inline int getMarginValue(const QMargins &margins, QCP::MarginSide side)
static int getMarginValue(const QMargins &margins, QCP::MarginSide side)
最后修改:2022 年 05 月 07 日
如果觉得我的文章对你有用,请随意赞赏