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. Qt Charts crash
QtWS25 Last Chance

Qt Charts crash

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qt 5.7chartchartscontrols 2material design
6 Posts 3 Posters 5.3k 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.
  • orzel1244O Offline
    orzel1244O Offline
    orzel1244
    wrote on last edited by orzel1244
    #1

    Hello, I'm trying to create chart, but my application is crashing, mayby someone can help me?
    ScreenShot
    main.qml
    main.cpp

    I'm sorry for my simple english, I'm still learning

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From the error on the IDE console, you should have a QApplication and not a QGuiApplication.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      4
      • orzel1244O Offline
        orzel1244O Offline
        orzel1244
        wrote on last edited by
        #3

        It's working, thanks a lot :D

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            From the error on the IDE console, you should have a QApplication and not a QGuiApplication.

            K Offline
            K Offline
            KRHC
            wrote on last edited by
            #5

            @SGaist i'm having QML application and backend is QT (Qt 5.15) , in my application i'm using chartview
            with QApplication its working fine But need to ask is there any problem we might face in project or application if use QApplication instead of QGuiApplication for Qt 5.15 ,

            QGuiApplication - base class + GUI capabilities. Use it in QML applications.
            QApplication - base class + GUI + support for widgets. Use it in QtWidgets applications.

            SGaistS 1 Reply Last reply
            0
            • K KRHC

              @SGaist i'm having QML application and backend is QT (Qt 5.15) , in my application i'm using chartview
              with QApplication its working fine But need to ask is there any problem we might face in project or application if use QApplication instead of QGuiApplication for Qt 5.15 ,

              QGuiApplication - base class + GUI capabilities. Use it in QML applications.
              QApplication - base class + GUI + support for widgets. Use it in QtWidgets applications.

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @KRHC hi and welcome to devnet,

              You need QApplication if you use anything that relies on the widgets module. Otherwise, there's no need for it and you would just bloat your deployment for no good reason.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • K Kiovtorov referenced this topic on

              • Login

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