reference to connect is ambiguous QQuickItem QMainWindow QCustomPlot
I am trying to use QCustomPlot's example of the following folder, in my program:
/examples/plots
and at the same time I want it accessible from QML. So, I added <QQuickItem> and it resulted in the error stated in the title.
The code:
Code:
#include <QQuickItem>
#include <QMainWindow>
#include <QTimer>
#include "../../qcustomplot.h"
namespace Ui {
class MainWindow;
}
class MainWindow
: public QQuickItem,
public QMainWindow{
Q_OBJECT
What should I do to make it accessible from QML and solve the error too?
Re: reference to connect is ambiguous QQuickItem QMainWindow QCustomPlot
QMainWindow and QQuickItem are QObject subclasses.You can only derive from QObject once.
QMainWindow is also a QWidget, which is not something you can display in a QtQuick2 scene anyway.
Cheers,
_
Re: reference to connect is ambiguous QQuickItem QMainWindow QCustomPlot
Or if you want a QMainWindow like thing in QML, you can have a look at QML's Window element