qtcharts iOs error : unknown method return type: QAbstractAxis*



  • Hi,
    I am trying to manage QtCharts in QML with c++.
    I only got this error on iOs, but no error on android, linux, osx.

    "Unknown method return type: QAbstractAxis*"

    Why only on iOs? If QtCharts was missing, we suppose to got error earlier.

    header file :
    class CustomChart : public QObject {
    Q_PROPERTY(QtCharts::QAbstractAxis* x_axis WRITE setXAxis READ xAxis);
    QtCharts::QAbstractAxis* xAxis();
    void setXAxis(QtCharts::QAbstractAxis* axis);
    [...]
    }

    qml :
    [...]
    ChartView {
    id: chartViewCustom
    Component.onCompleted: {
    customChart.x_axis = chartViewCustom.axisX(chartViewCustom.series(0))
    }
    axisX: DateTimeAxis {
    tickCount: 4
    minorGridVisible: true
    color: "black"
    format: "mm:ss"
    }
    }
    [...]

    Someone see the problem? I have a lot of code, so i try to focus with interraction of QAbstractAxis.
    Thanks for your help.



  • I had a similar issue with iOS and QtCharts...

    I had to add this to my *.pro file to get it to work (the 'charts' and QTPLUGIN line...):

    QT += core qml quick widgets network websockets charts
    QTPLUGIN += qt5charts

    --Sam


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.