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. [solved] xy data plot in QML
Forum Updated to NodeBB v4.3 + New Features

[solved] xy data plot in QML

Scheduled Pinned Locked Moved QML and Qt Quick
13 Posts 7 Posters 15.5k Views 1 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.
  • V Offline
    V Offline
    Victor
    wrote on last edited by
    #1

    Hello,
    Still a newb, but...

    I need a QML widget that draws xy plots (not a bar graph) with a vector of data (from C++ that may arrive anytime.. so also need a
    way to notify the widget about new data arrival).

    I notice qt3d project and all its awesome fanciness.

    But I do not see even a simple xy plot/graph widget I can use in QML.

    I know about QWT, but I would rather avoid using it: I asked question how to integrate with QML but got very short,cryptic incomplete response that did not help at all).

    I saw a discussion about creating a chart widget but it seems stalled (IIRC, waiting for scenegraph changes).

    If there is 3d graphics, why is there no 2d? Should I even consider using qt3d for drawing xy plots?

    If anyone have a complete functional example in QML that I could learn from, then of course that would be excellent.

    Thank you.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      geronik
      wrote on last edited by
      #2

      If internet connection is available then you could use google charts!

      1 Reply Last reply
      0
      • M Offline
        M Offline
        minimoog77
        wrote on last edited by
        #3

        If you can paint (using QPainter) then it's easy to integrate to QML.

        I don't know QWT, but if they paint, you can easily integrate that into QML.

        There is no 2d graphics, because it's already there (QPainter).

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Victor
          wrote on last edited by
          #4

          Thanks for the replies....

          To geronik I would say:
          Google charts is NOT an answer. It was not even the question.

          To me, the lack of a graph widget is a big glaring hole in QML functionality, especially when you see all the very cool widgets that do exist.

          If as minimoog77 suggests it is easy, then why isn't there even ONE that is part of the standard qt set of cool widgets?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            minimoog77
            wrote on last edited by
            #5

            I sad that integration with code that already uses QPainter is easy, not that plotting graph is easy to do. :)

            I don't have experience with QWT, but you could use or look their code how they are painting xy graph. Inherit QDeclarativeItem, do your own painting, and that's it.

            Qt was and is providing more or less standard widgets, it's not plotting library.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Diph
              wrote on last edited by
              #6

              Check QML Canvas: http://qt.gitorious.org/qt-labs/qmlcanvas

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Victor
                wrote on last edited by
                #7

                Diph,
                This looks very interesting. I looked at the examples there and there is a plotting example. Do not see any documentation, but it seems like one possible path forward.
                Thanks!

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #8

                  To get another idea you could look at this "example":http://www.developer.nokia.com/Community/Wiki/CS001627_-_Creating_a_custom_QML_element_with_Qt of drawing a line and expand on the concept.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    shullw
                    wrote on last edited by
                    #9

                    Just wanted to say thanks to mlong for posting that line example. I will be using that one.

                    A QML Purest Point of View!

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mlong
                      wrote on last edited by
                      #10

                      No problem! I've used it before, as well, for similar functions :)

                      Be sure and rename the thread to add [Solved] if your question has been answered sufficiently. Thanks!

                      Software Engineer
                      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        Victor
                        wrote on last edited by
                        #11

                        This thread seems ended. I guess I should mark it "solved", though there is plenty of interpretation and code to write.

                        Not sure how to mark this "solved". Can someone explain?
                        Thanks!

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mlong
                          wrote on last edited by
                          #12

                          Edit your initial post and change the title, adding [Solved] at the beginning.

                          Software Engineer
                          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            Julie1986
                            wrote on last edited by
                            #13

                            Could somebody post a code which might be of some help to beginners like me.. THank you.

                            1 Reply Last reply
                            0

                            • Login

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