2

Firstly, my QT environment is 5.12.0 with MSVC 2017 64 bit, I used 5.10.0 with MSVC 2017 64 bit before but the result is same.

For example, in QLineSeries, setPointsLabelVisible and setPointsVisible would be disabled. In QScatterSeries, setMarkerShape would be disabled.Just like the picture I uploaded.

pic 1

enter image description here

In this picture I didn't setUseOpenGL(true)
pic 2

enter image description here

While in this picture I setUseOpenGL(true) and the markerShape became block instead of circle with a edge.

I tried set these properties after setUseOpenGL(true) but it doesn't work.

I want to know how to make these properties enabled when using setUseOpenGL(true).

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Martzki
  • 41
  • 4

1 Answers1

2

I have just reviewed the source code of QtChart, all QChartSeries are inherited from QAbstractSeries and in QAbstractSeries there are some functions like setUseOpenGL. There are some annotations:

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

  • Series animations are not supported for accelerated series.
  • Point labels are not supported for accelerated series.
  • Pen styles and marker shapes are ignored for accelerated series.
  • Only solid lines and plain scatter dots are supported.
  • The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
  • Polar charts do not support accelerated series.
  • Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.

I think it means setUseOpenGL is used for high-performance in drawing. And it would not support many features which are supported when you are not using setUseOpenGL.

Community
  • 1
  • 1
Martzki
  • 41
  • 4