QCustomPlot Discussion and Comments

QCustomPlot still under development?Return to overview

I appears that there are no more updates on GitHub. Is this great tool still updated?

It is, the git repo only shows the public branches. Experiments and prototypes are not shown. The next release which will bring compatibility with the current Qt version as well as some feature additions (such as an experimental radial plot) and bugfixes will be pushed shortly!

Any plans to make development more visible so that there would be no need for people to ask such? I also pondered similar question when recently faced some minor issues with an algorithm not compiling with QCPDataContainer because the container is missing cbegin()/cend() and const-versions of begin()/end() even though it has constBegin() and constEnd(). It was rather unsuccessful to try to find issue tracker, way of submitting patches or recent activity to check if such would have been already added to (possible) new versions.

Any news on the release of the next version? I'm currently working on a project with Qt5.14 and getting more and more deprecation warnings and came across this forum post.

Manu, gibt es noch Hoffnung für uns, dass Qt 6 unterstützt wird?
Leider werden die Meldungen häufiger und dringlicher.

Hey Tomax_63,
The next minor release 2.1.0 due in a few days will bring compatibility with the latest Qt5 release. After checking how much changes must be made to also include Qt6 for the first time, it might also expand to do that (I've read the step from the last Qt5 and Qt6 isn't as breaking as Qt4 to 5 was, so there's a good chance)

That is great news! Looking forward to playing with the updated version.

Looking forward too. Thanks a lot in advance.

Hello Manu

Are there any news concerning an update? I am sadly blocked in my development.

Best wishes

Thomas

Hey Manu

"The next minor release 2.1.0 due in a few days will bring compatibility with the latest Qt5 release."

Could you let us know how many days are "a few"?

We are really desperately awaiting your brilliant work again.

Thomas

It's a pity to see the development status causing so much uncertainty. Not least because I've had to do some tweaks to get QCustomPlot compile with Qt6, and while it was done in hacky manner just get it compiled, it was enough to give an impression that porting it properly even to Qt6 wouldn't probably be a big task - any fixes for newer Qt5 might be almost cosmetic. And given how pleased I've been with the capabilities of QCustomPlot, had there been any indication that contributions would be needed or welcome, there's a good chance that updates could have been progressed with external help.

The code is GPL, anyone can fork the code in https://gitlab.com/DerManu/QCustomPlot/-/forks and if they were so inclined could take on the effort of developing the new code. The truth is though, it is a lot of work and most people contributing to OSS are people doing so in their free time.

I blame Qt more than anyone for the current situation. Pulling the rug out from everyone developing OSS on QT and forcing everyone to QT 6 was a real jerk move. It take a lot of time to get these libraries updated by people who are already stressed enough from their day jobs.

I pulled 2.1.0 from https://gitlab.com/DerManu/QCustomPlot/-/tree/dev-2.1.0 and was able to compile without errors on Qt 5.15.2, and I only made minor modifications to get it to compile on Qt 6.0.2 using VS 2019 x64 compiler. Both seem to run ok in my app when linked as static libraries (didn't check dynamic).

The 6.0.2 changes are modifying three (?) iterations that no longer support the "-" operator, changing the "QPainter::HighQualityAntialiasing" to just "QPainter::Antialiasing", and using Q_MOC_INCLUDE to get the type information needed that is no longer adequate from just using a forward class declaration for Qt 6. Pretty simple once you know what is needed.

The 2.1.0 branch has the most recent changes shown as 10 months ago. All the other branches are older.

I would be willing to share if there is interest.

Also, there are some compiler flags that seem to be important. I am not sure what they all do, but the 2.1.0 .pro file has them noted and the VS 2019 (latest) Qt plugin imported them:

-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458

It seemed important that the project linking to the static qcustomplot.lib have the same.

Hi mmccullo,

Could you share files qcustomplot.cpp and qcustomplot.h that work with Qt6.

Thanks

mmccullo,

please share the files so we can at least try to work on with newer Qt versions.

Thanks a lot in advance,

Thomas

Changes posted at https://bitbucket.org/americanmagneticsinc/qcustomplot/commits/7a154e44c333fa18067aef749f185633e2c8a508.

Branch dev-2.1.0 compiles without issues for me with Qt 5.15.2 as provided on the official QCustomPlot repository.

However, the above URL I reference has my commit of changes that also work with Qt 6.0.2. Check those iterator changes. I think they should be correct. The "-" operator was removed in Qt 6.

If I download the repository from that site, does it have your chages included?
Thomas

The commit with the changes necessary to support Qt6 is in provided in the URL in my March 12 message above. It is on branch "dev-2.1.0" which is not officially released. Some basic knowledge on how to use Git (or your favorite GUI Git tool) is recommended. If you clone the repository on your machine and checkout that commit, you will have all the changes.

Thats a pity.
I dont have enough knowledge for that.

Thomas

Thomas, no coder should be Git illiterate in today's world. A hour or two of reading and videos should get you started enough to be able to clone a repository and checkout a commit.

https://git-scm.com/doc

mmccullo, thanks for the hint.

As a matter of fact, i am not a coder but a textile engineer dealing with pumps and in terms of coding i am just a bare user of prepared libraries.
So you can imagine my limits here. I just have to wait until the next officiel version will be available in a form in which I can handle it.
Thanks for your ideas and help anyway.

Thomas

Thomas,

You can also directly download the modified sources directly from the bitbucket link that was provided (download area on the left), if you are not confident in your git skills.

Vincent

Vincent,

But these files are not compatible with Qt6, or are they?

Thomas

I've not tried, but they should be compatible with Qt 6 (see message from mmccullo, March 12, 2021, 18:00).

Vincent

Vincent,

I cant find the files qcustomplot.h and .cpp in tne download.
These files are included in my Qt project.
Can you explain to me how to do it?

Thomas

There is apparently an additional script to merge all header/source files into a single file. In the bitbucket git repository, you have all the sources (one file per class). You can still work with that.

Otherwise, the best is may be to wait for the official Qt6 compatible QCustomPlot release.

Vincent

Thanks for the help.
Apparently I am not skilled enough to keep developping with qcp at the moment.
Sad to accept, because I deem it a brilliant tool.

Thomas

I guess no good deed goes unpunished. Here is the two file amalgamated output. I can't test because the examples in the distribution are broken for Qt 6 and I don't have time to fix all those, but it compiles and works fine for Qt 5.15.2. It should work for Qt 6. Use at your own risk!

https://bitbucket.org/americanmagneticsinc/qcustomplot/downloads/qcustomplot.zip

mmccullo,

Thank you SO much! It compiles smoothly with 5.12.4 but sadly my application crashes in 5.15.2 an 6.0.1.
I don't think it has to do with QCP, because it crashes on the line

ui->setupUi(this);

Crash message: Name of signal: SIGSEGV Segmentation fault :-((
So I will have to scan my code why this happens (no idea atm though)

Thomas

I have had some minor issues with Qt Designer saving some UI configurations in the UI files that are not compatible with Qt 6, but that are not related to QCP. However, those throw an error during compilation in my projects and I simply make an edit in the generated file(s). Sadly I do have to make the same corrections every time I do a clean rebuild.

mmccullo,

Which generated files do you modify? Just the .ui file to pne and make a minor edit?

Thomas

FYI the official release of QCP 2.1.0 which you can find in the download section now supports up to Qt 6.0

Cool. Many thanks for you amazing work ;-).

What is on the menu for the future of QCustomPlot in terms of new functionalities (beside the finalization of the radial plot)? Do you have something to share with us? Can we propose ideas?

Vincent

@DerManu : thanks!!

Thank you so much!

Any plans to decouple QCP from Qt and make it possible to provide different backends?