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. QtCharts leads to crashes
Qt 6.11 is out! See what's new in the release blog

QtCharts leads to crashes

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 785 Views
  • 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.
  • S Offline
    S Offline
    Sajjad Ali
    wrote on last edited by
    #1

    Hello, my app crashes as soon as I add ChartView in main.qml file. It says failed to load component.

    I tried replacing QGuiApplication with QApplication as suggested in some related forum question. But It says QApplication does not exist.

    a45692f2-1823-4751-9ead-30f18474fefe-image.png
    d90b5e2a-b106-4d95-8d87-0b0cd881a3a0-image.png
    de29f3dc-a577-4119-adf2-7a191886a8ec-image.png

    jsulmJ 1 Reply Last reply
    0
    • S Sajjad Ali

      Hello, my app crashes as soon as I add ChartView in main.qml file. It says failed to load component.

      I tried replacing QGuiApplication with QApplication as suggested in some related forum question. But It says QApplication does not exist.

      a45692f2-1823-4751-9ead-30f18474fefe-image.png
      d90b5e2a-b106-4d95-8d87-0b0cd881a3a0-image.png
      de29f3dc-a577-4119-adf2-7a191886a8ec-image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Sajjad-Ali Please post code as text, not pictures!
      The problem you have is not related to QtCharts.
      Your main.qml file cannot be found. Check your resource file.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      GrecKoG 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Sajjad-Ali Please post code as text, not pictures!
        The problem you have is not related to QtCharts.
        Your main.qml file cannot be found. Check your resource file.

        GrecKoG Offline
        GrecKoG Offline
        GrecKo
        Qt Champions 2018
        wrote on last edited by
        #3

        You also need a QApplication and not a QGuiApplication since the Qt Charts module depends on Qt Widgets.

        1 Reply Last reply
        2
        • S Offline
          S Offline
          Sajjad Ali
          wrote on last edited by
          #4

          @GrecKo yes this is working. Thanks.

          • I changed QGuiApplication to QApplication

          I did same thing yesterday, but it was not working that time, but its working now.

          @jsulm sorry for inconvenience I will post code as text next time :-)

          1 Reply Last reply
          0
          • S Sajjad Ali has marked this topic as solved on

          • Login

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