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. Best way to draw graph axes in QML
Qt 6.11 is out! See what's new in the release blog

Best way to draw graph axes in QML

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 5.1k 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.
  • X Offline
    X Offline
    xsacha
    wrote on last edited by
    #1

    I want to draw a graph using QML and was wondering what is the best way to tackle the axes ticks (eg. 100, 200, 300) without the code looking too messy.
    It has to be aligned properly and capable of scaling to different sets of numbers with ease (like changing one var).

    What's the best Type to use?

    Thanks

    • Sacha
    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kxyu
      wrote on last edited by
      #2

      the only way to draw in QML is using rectangles

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        Best way is to write your own diagram items I guess.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kxyu
          wrote on last edited by
          #4

          [quote author="Tobias Hunger" date="1295949292"]Best way is to write your own diagram items I guess.[/quote]

          you're right. sorry, I meant doing it without any C++.

          1 Reply Last reply
          0
          • 2 Offline
            2 Offline
            2beers
            wrote on last edited by
            #5

            I think you should wait for canvas element: http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-143

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Without C++ this is going to be much slower. Make sure the UI is still fast enough on the slowest platform you are targeting.

              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