custom plot
-
@Rockerz getaway shootout said in custom plot:
How to set up qcustomplot.h in windows 10?
Get the latest version of QCustomPlot from the download section.
Use the qcustomplot.h and qcustomplot.cpp file like any other ordinary class file- Right click on the root entry of your project in the left sidebar and choose Add Existing Files...
- In the appearing file dialog, select the qcustomplot.h and qcustomplot.cpp files, to add them to your project.
- If you are using Qt version 5.0 upwards, you need to add printsupport to the QT variable in your .pro file. In the case shown above, this is done after a greaterThan(QT_MAJOR_VERSION, 4) conditional. This makes sure the printsupport (and widgets) is not added when using older Qt versions.
- The project is now ready to use QCustomPlot. Place a regular QWidget on your form in the desired location. Right click on it and hit Promote to...
- In the appearing dialog, enter QCustomPlot in the input field next to Promoted class name. The input next to Header file should automatically fill with the correct qcustomplot.h value. Hit Add to add QCustomPlot to the promoted classes list and finally hit Promote to turn the QWidget on your form into a QCustomPlot.
-
@JonB I tried but I got tar.gz file extracted and add these file (qcustomplot.h, qcustomplot.cpp) I'm getting many unresolved errors
where to get the dll file ?
I searched and I download from official website only tar files I found (https://www.qcustomplot.com/index.php/introduction) -
@Rockerz
As you can see from their web site, it does not look like a pre-built .DLL file is available. You are supposed to download the sources, compile and use the result in your Qt project. You can probably either compile it to DLL as a library to use or include sources directly into your own project without DLL/library, I would not know.It looks like @graciedavis has suggested the latter, i.e. just use source file directly in your project.
-
@Rockerz said in custom plot:
@JonB I tried but I got tar.gz file extracted and add these file (qcustomplot.h, qcustomplot.cpp) I'm getting many unresolved errors
where to get the dll file ?
I searched and I download from official website only tar files I found (https://www.qcustomplot.com/index.php/introductionbasket randomIf you encounter unresolved errors, ensure that the compiler is configured correctly to use the Qt framework and that the QCustomPlot library is properly linked to your project. Check for any typos in the include statements and library paths. Under "Additional Libraries," add the path to the qcustomplot.lib file (e.g., C:\Qt\5.14.2\msvc2019_64\lib\qcustomplot.lib).