Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QCharts look different when using setUseOpenGL(true)
Qt 6.11 is out! See what's new in the release blog

QCharts look different when using setUseOpenGL(true)

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 3.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.
  • BarronjB Offline
    BarronjB Offline
    Barronj
    wrote on last edited by
    #1

    I'm trying to generate plots using a QChart with a QLineSeries. When I don't have OpenGL enabled, the plot is smooth and shows every detail. When I set it to true, looks very decimated. And the few points that do exist have the following pattern: there is a vertical line and then a diagonal line from that to another vertical line. Here is with no OpenGL.0_1473707761884_NoOpenGL.png

    Here is with OpenGL.

    0_1473707794961_OpenGL.png

    All the rest of the code is identical. I just call setUseOpenGL(true) for the second. I'm running this on an Ubuntu 16.04.1 Virtual machine in VMWare Player.

    Thank you for any help and support.

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

      hi.
      Upload images is currently broken so even you see them, others cannot.
      Its better to use external site and link here.
      Sorry for the inconvenience.

      1 Reply Last reply
      0
      • BarronjB Offline
        BarronjB Offline
        Barronj
        wrote on last edited by
        #3

        OK. Here are some Imgur links.

        Without OpenGL: alt text

        With OpenGL: alt text

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jpedrick
          wrote on last edited by
          #4

          I ran into exactly this same problem. It's caused by the GLWidget class using floating point precision, y values are fine, but your x values are greater than max float. What you could do is rebase your timestamps by subtracting the min timestamp from your series.

          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