Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. using ChartView crashes app
Forum Updated to NodeBB v4.3 + New Features

using ChartView crashes app

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 809 Views 2 Watching
  • 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      Make you app QApplication instead of QCoreApplication.

      C++ is a perfectly valid school of magic.

      mzimmersM 1 Reply Last reply
      3
      • fcarneyF fcarney

        Make you app QApplication instead of QCoreApplication.

        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        @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?

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by
          #4

          @mzimmers said in using ChartView crashes app:

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

          QtCharts uses widgets under the hood.

          C++ is a perfectly valid school of magic.

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved