Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved QtCharts leads to crashing of application

    QML and Qt Quick
    1
    2
    286
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Leon_2001 last edited by

      Hi everyone,

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtCharts 2.3
      
      Window {
          visible: true
          width: 640; height: 480
      
          ChartView {
              anchors.centerIn: parent
              width: 400; height: 400
          }
      }
      

      does not work. I also tried several other things (with ApplicationWindow, more content etc.).
      It just crashes.

      Error: EXC_BAD_ACCESS (SIGSEGV)

      I did link to charts in my project file.

      It is somehow related to Window/ApplicationWindow/QApplicationEngine. The examples of QT are working and use QQuickView.

      Anyone an idea what is going on here?

      1 Reply Last reply Reply Quote 0
      • L
        Leon_2001 last edited by

        I found the solution to the problem. I uses QGuiApplication instead of QApplication, I overread that I need this.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post