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. radial gradient in Q3DScatter
Qt 6.11 is out! See what's new in the release blog

radial gradient in Q3DScatter

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 808 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.
  • M Offline
    M Offline
    maria ivanovna
    wrote on last edited by
    #1

    How to make radial gradient in Q3DScatter or in Scatter3D?

    DiracsbracketD 1 Reply Last reply
    0
    • M maria ivanovna

      How to make radial gradient in Q3DScatter or in Scatter3D?

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by Diracsbracket
      #2

      @maria-ivanovna

      You mean something like this:

      0_1534838318393_0ce887e9-d954-4606-98e9-383d08372e9c-image.png

      Unfortunately, Q3DScatter applies the same color to all points in the series. So the idiotic approach I tried is to create a new series for each point, and set its color manually...

      For the example shown above, I used the cosine wave computation code from the Qt example:
      https://doc.qt.io/qt-5/qtdatavisualization-scatter-example.html

      And used the gpJet gradient color array generated by QCustomPlot.
      https://www.qcustomplot.com/documentation/classQCPColorGradient.html
      It's very easy to extract the code from there.

      Not really efficient all this (and slow...), but maybe it can help you out. Hopefully, someone will come up with a better solution.

      1 Reply Last reply
      1

      • Login

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