Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

using ChartView crashes app



  • Hi all -

    I've been developing a view using a ChartView in qmlscene for a bit, and just tried using it within my app. I get a segfault:
    stacktrace.PNG

    Here's the extract of the qml file:

    import QtQuick 2.12
    import QtQuick.Controls 2.12
    import QtQuick.Layouts 1.14
    import QtCharts 2.3
    import libstyles 1.0
    
    
    Rectangle {
      id: root
        ChartView {
        }
    }
    

    Any ideas what's going on here? I don't see anything in the docs about having to set a theme, but the stack trace seems to imply that it expects one.



  • Make you app QApplication instead of QCoreApplication.



  • @fcarney I definitely am going to owe you a beer (or three)...that fixed it. (It was originally a QGuiApplication, but changing it fixed things.)

    So, in a nutshell...what was wrong?



  • @mzimmers said in using ChartView crashes app:

    So, in a nutshell...what was wrong?

    QtCharts uses widgets under the hood.


Log in to reply