@suslucoder As the error message tells you addSeries takes a QAbstractSeries, not a string list as parameter. You have to pass it one of the QAreaSeries, QBoxPlotSeries, QCandlestickSeries, QPieSeries, and QXYSeries.
You also should tell us what data your file actually contains? If it contains x/y values then you first have to convert the data to numbers and create a QXYSeries instance and fill it with that data (https://doc.qt.io/qt-5/qxyseries.html#append).
@DrakeM said in Gaps in QLineSeries:
When using line series, we've had severe performance problems. We end up with thousands of series to handle all of the gaps and have to create parallel scatter series because we want icons for each point that aren't part of the standard icon set.
We pay a huge cost both constructing and destructing the series. Seems like it may be refreshing on each add series, but even removeAllSeries is slow. Have tried many things to suspend the painting, but with no timing effect.
Any ideas on how to have many gaps without destroying performance?
You can generate gaps by adding qQNaN()'s to the series. However, it doesn't seem to work with append() (it ignores NaN's), but setting the whole point data at once takes NaN's into account.
Yes, in another project.
QGraphicsView lays a top of QAbstaractScrollArea, so scroll bars appears there out of a box. But it requires a few lines of code to add scrolling by drag a scene.
This time I needed QML way.
@KRHC hi and welcome to devnet,
You need QApplication if you use anything that relies on the widgets module. Otherwise, there's no need for it and you would just bloat your deployment for no good reason.
Hi @Hedge,
You have following ways to do it:
Defining QML Types from C++
In short create a QObject derived class and register it using qmlRegisterType so that it is available in QML.
Exposing Attributes of C++ Types to QML
Create a QObject derived class , add some public slots or Q_INVOKABLE functions and make these available by setting that class as a contextProperty.
In both the cases it will be good idea to provide some properties defined as Q_PROPERTY with their respective signals so that QML gets notified on changes in the values of these properties from C++.
BarSeries {
id: currentPlot
axisX: BarCategoryAxis {
id: categoryAxis
labelsFont:Qt.font({pointSize: 6})
Qt.font function accept an javascript object with all keys relevant to font.
The most commonly used properties are:
string font.family
bool font.bold
bool font.italic
bool font.underline
real font.pointSize
int font.pixelSize
vertexData() returns only the data in ram and not the real VBO which is stored in GPU-ram.
As soon as you mark it as dirty it gets completely copied into GPU.
Meanwhile I have implemented a direct opengl-way where I create the VBO myself.
Thanks anyway!
cu
Hi and welcome to devnet,
The best way to have information for 1 and 2 is to contact the Qt Company directly. These two modules are available to the commercial customers but you can try them with the trial package.
AFAIK, Qwt only provides widgets
I don't know that one
Hope it helps