在類QCustomPlot中,我想在QWidget類的構造函數中使用枚舉,該類使用QCustomPlot類。在Qt插槽中使用枚舉
#include "qcustomplot.h"
SignalViewerDialog::SignalViewerDialog(QVector<double> x_1,
QVector<double> y_1,
QCPScatterStyle::ScatterProperty ScatterProp,
QCPScatterStyle::ScatterShape ScatterShp,
QCPGraph::LineStyle LineSt,
QWidget *parent) : QDialog(parent)
ERROR
/Users/konstantin/Desktop/SVMGLEP/signalviewerdialog.cpp:72:ошибка:參考輸入 'const的QCPScatterStyle' 不能結合類型的左值「QCPScatterStyle :: ScatterProperty' ui.widgetGraph-> graph() - > setScatterStyle(ScatterProp); ^ ~~~~~~~~~~
建議的答案是否解決了問題?謝謝。 – iksemyonov