{"id":102190,"date":"2026-09-08T09:57:08","date_gmt":"2026-09-08T01:57:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/102190.html"},"modified":"2026-09-08T09:57:08","modified_gmt":"2026-09-08T01:57:08","slug":"gpl%e6%b1%a1%e6%9f%93%e5%8d%b1%e6%9c%ba_qcustomplot%e8%bf%81%e7%a7%bb%e5%ae%9e%e6%88%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/102190.html","title":{"rendered":"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218"},"content":{"rendered":"<h2>Qt \u5de5\u4e1a\u8f6f\u4ef6 GPLv3 \u6c61\u67d3\u5371\u673a&#xff1a;QCustomPlot \u2192 Qt Charts \u8fc1\u79fb\u5b9e\u6218<\/h2>\n<p>\u5de5\u4e1a\u8f6f\u4ef6\u8981\u5546\u4e1a\u5316&#xff0c;\u8bb8\u53ef\u8bc1\u5408\u89c4\u662f\u5fc5\u7ecf\u4e4b\u8def\u3002QCustomPlot \u7684 GPLv3 \u8bb8\u53ef\u7ed9\u95ed\u6e90\u4ea7\u54c1\u57cb\u4e0b\u4e86\u9690\u60a3\u3002\u672c\u6587\u8be6\u8ff0 PLCMonitor \u5982\u4f55\u4ece QCustomPlot \u8fc1\u79fb\u5230 Qt Charts&#xff08;LGPLv3&#xff09;&#xff0c;\u6d88\u9664 GPL \u6c61\u67d3&#xff0c;\u4ee5\u53ca\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u7684 API \u6620\u5c04\u548c\u5751\u70b9\u3002<\/p>\n<p>\u514d\u8d23\u58f0\u660e&#xff1a;\u672c\u6587\u4ec5\u63cf\u8ff0 PLCMonitor \u81ea\u8eab\u60c5\u51b5&#xff0c;\u4e0d\u6784\u6210\u6cd5\u5f8b\u5efa\u8bae\u3002\u4ee5\u4f60\u6700\u7ec8\u91c7\u8d2d\u7684\u6cd5\u5f8b\u610f\u89c1\u4e3a\u51c6\u3002<\/p>\n<hr \/>\n<p>\u672c\u6587\u76ee\u5f55&#xff1a; \u2460GPLv3 \u98ce\u9669 \u2461API \u6620\u5c04 \u2462\u5b9e\u65bd\u6b65\u9aa4 \u2463\u6838\u5fc3\u4ee3\u7801 Diff \u2464\u98ce\u9669\u70b9 \u2465\u7ed3\u8bed<\/p>\n<hr \/>\n<h3>\u2460 GPLv3 \u98ce\u9669&#xff1a;\u4e3a\u4ec0\u4e48\u5fc5\u987b\u8fc1\u79fb&#xff1f;<\/h3>\n<h4>1.1 \u4ec0\u4e48\u662f GPL \u6c61\u67d3<\/h4>\n<p>GPL&#xff08;General Public License&#xff09;\u662f\u6700\u4e25\u683c\u7684\u5f00\u6e90\u8bb8\u53ef\u8bc1\u4e4b\u4e00\u3002\u6838\u5fc3\u6761\u6b3e&#xff1a;<\/p>\n<p>\u884d\u751f\u4f5c\u54c1\u5fc5\u987b\u540c\u6837\u4ee5 GPL \u53d1\u5e03<\/p>\n<p>\u8fd9\u610f\u5473\u7740&#xff1a;\u5982\u679c\u4f60\u7684\u8f6f\u4ef6\u94fe\u63a5\u4e86 GPLv3 \u7684\u5e93&#xff0c;\u4f60\u7684\u6574\u4e2a\u8f6f\u4ef6\u90fd\u5fc5\u987b\u5f00\u6e90\u3002<\/p>\n<p>\u5bf9\u4e8e\u5546\u4e1a\u5de5\u4e1a\u8f6f\u4ef6&#xff0c;\u8fd9\u662f\u4e0d\u53ef\u63a5\u53d7\u7684\u3002<\/p>\n<h4>1.2 QCustomPlot \u7684\u95ee\u9898<\/h4>\n<p>QCustomPlot \u662f\u4e00\u4e2a\u4f18\u79c0\u7684 2D \u7ed8\u56fe\u5e93&#xff0c;\u529f\u80fd\u5f3a\u5927\u3001API \u7b80\u6d01\u3002\u4f46\u5b83\u91c7\u7528 GPLv3 \u8bb8\u53ef&#xff1a;<\/p>\n<p>QCustomPlot &#8211; a modern Qt plotting widget<br \/>\nCopyright (C) 2011-2024 Emil Frey<\/p>\n<p>This program is free software: you can redistribute it and\/or modify<br \/>\nit under the terms of the GNU General Public License as published by<br \/>\nthe Free Software Foundation, either version 3 of the License.<\/p>\n<p>\u4e00\u65e6\u94fe\u63a5 QCustomPlot&#xff0c;PLCMonitor \u5c31\u5fc5\u987b&#xff1a;<\/p>\n<li>\u5f00\u6e90\u5168\u90e8\u6e90\u7801<\/li>\n<li>\u6216\u4ee5\u5546\u4e1a\u8bb8\u53ef\u8d2d\u4e70\u6388\u6743&#xff08;QCustomPlot \u4e0d\u63d0\u4f9b\u5546\u4e1a\u8bb8\u53ef&#xff09;<\/li>\n<h4>1.3 \u5f71\u54cd\u8303\u56f4\u8bc4\u4f30<\/h4>\n<p>\u8fc1\u79fb\u524d&#xff0c;\u5148\u8bc4\u4f30\u5f71\u54cd\u8303\u56f4&#xff1a;<\/p>\n<p>\u76f4\u63a5\u4f9d\u8d56\u6587\u4ef6&#xff1a;<br \/>\n\u251c\u2500\u2500 src\/ui\/widgets\/chartpanel.h      \u2190 #include &#034;qcustomplot.h&#034;<br \/>\n\u251c\u2500\u2500 src\/ui\/widgets\/chartpanel.cpp    \u2190 \u5168\u90e8 QCustomPlot API \u8c03\u7528<br \/>\n\u251c\u2500\u2500 src\/app\/CMakeLists.txt           \u2190 \u7f16\u8bd1 QCustomPlot \u6e90\u7801<br \/>\n\u251c\u2500\u2500 CMakeLists.txt&#xff08;\u9876\u5c42&#xff09;            \u2190 \u9700\u8981\u6dfb\u52a0 Charts \u7ec4\u4ef6<br \/>\n\u2514\u2500\u2500 src\/common\/qcustomplot.h\/.cpp    \u2190 GPL \u6e90\u7801&#xff0c;\u9700\u5220\u9664<\/p>\n<p>\u95f4\u63a5\u5f71\u54cd&#xff08;\u65e0\u9700\u4fee\u6539&#xff09;&#xff1a;<br \/>\n\u251c\u2500\u2500 src\/ui\/models\/ChartManager       \u2190 \u7eaf\u6570\u636e\u7ba1\u7406<br \/>\n\u251c\u2500\u2500 src\/ui\/models\/TrendManager       \u2190 \u7eaf\u6570\u636e\u7ba1\u7406<br \/>\n\u2514\u2500\u2500 src\/app\/mainwindow               \u2190 \u53ea\u901a\u8fc7 customChart() \u8c03\u7528\u622a\u56fe<\/p>\n<p>\u7ed3\u8bba&#xff1a;\u9700\u8981\u4fee\u6539\u7684\u6838\u5fc3\u6587\u4ef6\u53ea\u6709 4 \u4e2a&#xff0c;\u5220\u9664 2 \u4e2a\u6587\u4ef6\u3002<\/p>\n<h4>1.4 \u5de5\u4f5c\u91cf\u5bf9\u6bd4<\/h4>\n<table>\n<tr>\u7c7b\u522b\u884c\u6570\u53d8\u5316\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u5220\u9664 QCustomPlot<\/td>\n<td>-3500<\/td>\n<td>qcustomplot.h\/.cpp &#043; chartpanel \u4e2d\u76f8\u5173\u4ee3\u7801<\/td>\n<\/tr>\n<tr>\n<td>\u65b0\u589e Qt Charts<\/td>\n<td>&#043;213<\/td>\n<td>\u5934\u6587\u4ef6\u66ff\u6362 &#043; setupUI &#043; \u6570\u636e\u66f4\u65b0<\/td>\n<\/tr>\n<tr>\n<td>CMakeLists \u4fee\u6539<\/td>\n<td>\u00b110<\/td>\n<td>\u7ec4\u4ef6\u58f0\u660e &#043; \u94fe\u63a5\u5e93<\/td>\n<\/tr>\n<tr>\n<td>\u51c0\u6548\u679c<\/td>\n<td>-3287<\/td>\n<td>\u4ee3\u7801\u91cf\u51cf\u5c11&#xff0c;\u8bb8\u53ef\u8bc1\u98ce\u9669\u5f52\u96f6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u2461 API \u6620\u5c04&#xff1a;QCustomPlot \u2192 Qt Charts<\/h3>\n<h4>\u6838\u5fc3\u7c7b\u578b\u6620\u5c04<\/h4>\n<table>\n<tr>QCustomPlot \u7c7b\u578bQt Charts \u5bf9\u5e94\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>QCustomPlot<\/td>\n<td>QChartView &#043; QChart<\/td>\n<td>Chart \u662f\u6570\u636e\u6a21\u578b&#xff0c;View \u662f\u89c6\u56fe\u7ec4\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>QCPGraph<\/td>\n<td>QLineSeries<\/td>\n<td>\u7ebf\u56fe\u7cfb\u5217<\/td>\n<\/tr>\n<tr>\n<td>QCPAxis<\/td>\n<td>QValueAxis \/ QDateTimeAxis<\/td>\n<td>X \u8f74\u5efa\u8bae\u7528 DateTime<\/td>\n<\/tr>\n<tr>\n<td>QCPAxisRect<\/td>\n<td>\u4e0d\u518d\u9700\u8981<\/td>\n<td>QChartView \u81ea\u52a8\u7ba1\u7406\u5e03\u5c40<\/td>\n<\/tr>\n<tr>\n<td>QCPGrid<\/td>\n<td>QValueAxis::setGridLineVisible()<\/td>\n<td>\u7f51\u683c\u7ebf\u901a\u8fc7 Axis \u63a7\u5236<\/td>\n<\/tr>\n<tr>\n<td>legend<\/td>\n<td>QChart::legend()<\/td>\n<td>\u56fe\u4f8b\u7531 Chart \u7ba1\u7406<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5173\u952e\u65b9\u6cd5\u6620\u5c04<\/h4>\n<table>\n<tr>QCustomPlot APIQt Charts \u7b49\u6548<\/tr>\n<tbody>\n<tr>\n<td>plot-&gt;addGraph(xAxis, yAxis)<\/td>\n<td>series &#061; new QLineSeries; chart-&gt;addSeries(series)<\/td>\n<\/tr>\n<tr>\n<td>graph-&gt;setPen(pen)<\/td>\n<td>series-&gt;setPen(pen)<\/td>\n<\/tr>\n<tr>\n<td>graph-&gt;setData(x, y)<\/td>\n<td>series-&gt;replace(x.begin(), x.end(), y.begin(), y.end())<\/td>\n<\/tr>\n<tr>\n<td>graph-&gt;data()-&gt;clear()<\/td>\n<td>series-&gt;clear()<\/td>\n<\/tr>\n<tr>\n<td>plot-&gt;xAxis-&gt;setRange(min, max)<\/td>\n<td>axisX-&gt;setRange(min, max)<\/td>\n<\/tr>\n<tr>\n<td>plot-&gt;replot()<\/td>\n<td>chart-&gt;update()&#xff08;\u901a\u5e38\u81ea\u52a8\u91cd\u7ed8&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>plot-&gt;savePdf(path)<\/td>\n<td>chart-&gt;savePdf(path)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u8f74\u7c7b\u578b\u9009\u62e9<\/h4>\n<table>\n<tr>\u573a\u666fQCustomPlot \u7528\u6cd5Qt Charts \u63a8\u8350<\/tr>\n<tbody>\n<tr>\n<td>\u5b9e\u65f6\u6a21\u5f0f X \u8f74<\/td>\n<td>QCPAxisTickerDateTime<\/td>\n<td>QDateTimeAxis<\/td>\n<\/tr>\n<tr>\n<td>\u5386\u53f2\u6a21\u5f0f X \u8f74<\/td>\n<td>\u7edd\u5bf9\u65f6\u95f4\u6233<\/td>\n<td>QDateTimeAxis<\/td>\n<\/tr>\n<tr>\n<td>\u5de6 Y \u8f74<\/td>\n<td>QValueAxis<\/td>\n<td>QValueAxis<\/td>\n<\/tr>\n<tr>\n<td>\u53f3 Y \u8f74<\/td>\n<td>QValueAxis (yAxis2)<\/td>\n<td>QValueAxis&#xff08;\u7b2c\u4e8c\u4e2a\u5b9e\u4f8b&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u2462 \u5b9e\u65bd\u6b65\u9aa4&#xff08;\u7cbe\u7b80\u7248&#xff09;<\/h3>\n<h4>Step 1&#xff1a;\u4fee\u6539 CMakeLists.txt<\/h4>\n<p>\u9876\u5c42 CMakeLists.txt \u6dfb\u52a0 Charts \u7ec4\u4ef6&#xff1a;<\/p>\n<p>find_package(Qt6 REQUIRED<br \/>\n  COMPONENTS Core Widgets Sql Svg Network PrintSupport Concurrent Pdf Charts<br \/>\n)<\/p>\n<p>src\/app\/CMakeLists.txt \u5220\u9664 QCustomPlot \u7f16\u8bd1\u6bb5&#xff0c;\u6dfb\u52a0 Qt6::Charts&#xff1a;<\/p>\n<p># \u5220\u9664 QCustomPlot \u6e90\u7801\u7f16\u8bd1<br \/>\n# set(QCUSTOMPLOT_SRCS &#8230;)<br \/>\n# if(MINGW) &#8230; endif()<\/p>\n<p>qt_add_executable(${PROJECT_NAME}<br \/>\n    ${PLCMonitor_SRCS}<br \/>\n    ${SOURCE_FILES}<br \/>\n    ${UI_FILES}<br \/>\n)<\/p>\n<p>target_link_libraries(${PROJECT_NAME} PRIVATE<br \/>\n    Qt6::Widgets Qt6::Sql Qt6::Core Qt6::Network<br \/>\n    Qt6::PrintSupport Qt6::Pdf<br \/>\n    Qt6::Charts   # \u65b0\u589e<br \/>\n)<\/p>\n<h4>Step 2&#xff1a;\u4fee\u6539 chartpanel.h<\/h4>\n<p><span class=\"token comment\">\/\/ \u5220\u9664<\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;qcustomplot.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u65b0\u589e<\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QChartView&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QChart&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QLineSeries&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QValueAxis&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QDateTimeAxis&gt;<\/span><\/span><\/p>\n<p>\u6210\u5458\u53d8\u91cf\u66ff\u6362&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u5220\u9664<\/span><br \/>\nQCustomPlot <span class=\"token operator\">*<\/span>m_plot <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQCPAxis <span class=\"token operator\">*<\/span>m_axisRight <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQMap<span class=\"token operator\">&lt;<\/span>QString<span class=\"token punctuation\">,<\/span> QCPGraph<span class=\"token operator\">*<\/span><span class=\"token operator\">&gt;<\/span> m_graphs<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u65b0\u589e<\/span><br \/>\nQChartView <span class=\"token operator\">*<\/span>m_plotView <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQChart <span class=\"token operator\">*<\/span>m_chart <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQDateTimeAxis <span class=\"token operator\">*<\/span>m_axisX <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQValueAxis <span class=\"token operator\">*<\/span>m_axisLeft <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQValueAxis <span class=\"token operator\">*<\/span>m_axisRight <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\nQMap<span class=\"token operator\">&lt;<\/span>QString<span class=\"token punctuation\">,<\/span> QLineSeries<span class=\"token operator\">*<\/span><span class=\"token operator\">&gt;<\/span> m_series<span class=\"token punctuation\">;<\/span><\/p>\n<h4>Step 3&#xff1a;\u5220\u9664 QCustomPlot \u6e90\u7801<\/h4>\n<p><span class=\"token function\">rm<\/span> src\/common\/qcustomplot.h<br \/>\n<span class=\"token function\">rm<\/span> src\/common\/qcustomplot.cpp<\/p>\n<h4>Step 4&#xff1a;\u66f4\u65b0\u8bb8\u53ef\u8bc1\u6587\u4ef6<\/h4>\n<p>&#8211; | QCustomPlot | 2.1.0 | GPLv3 | \u8d8b\u52bf\u56fe\u8868\u7ed8\u5236 | qcustomplot.com |<br \/>\n&#043; | Qt Charts | 6.11.1 | LGPLv3 | \u8d8b\u52bf\u56fe\u8868\u7ed8\u5236&#xff08;Qt \u539f\u751f&#xff09; | qt.io |<\/p>\n<hr \/>\n<h3>\u2463 \u6838\u5fc3\u4ee3\u7801 Diff<\/h3>\n<h4>Diff 1&#xff1a;\u622a\u56fe\u5b9e\u73b0<\/h4>\n<p>\u65e7\u7248 QCustomPlot \u6709\u539f\u751f savePng \u63a5\u53e3&#xff0c;\u652f\u6301 KeepAspectRatio \u7b49\u53c2\u6570&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u65e7&#xff1a;QCustomPlot<\/span><br \/>\n<span class=\"token function\">customPlot<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">savePng<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2.0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">customPlot<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">savePdf<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u65b0\u7248 Qt Charts \u7684 QChart \u5b8c\u5168\u4e0d\u63d0\u4f9b\u200b savePng() \u65b9\u6cd5&#xff0c;\u6b63\u786e\u505a\u6cd5\u662f\u9700\u8981\u901a\u8fc7 QChartView::grab() \u622a\u53d6\u50cf\u7d20\u56fe\u95f4\u63a5\u5b9e\u73b0&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u65b0&#xff1a;Qt Charts&#xff08;\u9879\u76ee\u5b9e\u9645\u5b9e\u73b0&#xff09;<\/span><br \/>\n<span class=\"token keyword\">const<\/span> QPixmap pix <span class=\"token operator\">&#061;<\/span> m_plotView<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">grab<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\npix<span class=\"token punctuation\">.<\/span><span class=\"token function\">save<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;PNG&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>PDF \u5bfc\u51fa\u4ecd\u7136\u53ef\u4ee5\u7528 chart-&gt;savePdf(path)\u3002<\/p>\n<h4>Diff 2&#xff1a;X \u8f74\u65f6\u95f4\u6233\u2014\u2014\u8fc1\u79fb\u7b2c\u4e00\u5927\u5751<\/h4>\n<p>QDateTimeAxis \u8981\u6c42 X \u503c\u5fc5\u987b\u662f\u6beb\u79d2\u7ea7 epoch&#xff0c;\u4f20\u79d2\u7ea7\u4f1a\u663e\u793a\u6210 1970-01-01 \u6216\u7a7a\u767d\u3002<\/p>\n<p><span class=\"token comment\">\/\/ \u2717 \u9519\u8bef&#xff1a;\u9664\u4ee5 1000 \u5f97\u5230\u79d2\u7ea7&#xff0c;QDateTimeAxis \u65e0\u6cd5\u6b63\u786e\u89e3\u6790<\/span><br \/>\nseries<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">append<\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">QPointF<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">QDateTime<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">fromSecsSinceEpoch<\/span><span class=\"token punctuation\">(<\/span>t<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">toMSecsSinceEpoch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token number\">1000.0<\/span><span class=\"token punctuation\">,<\/span> value<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u2713 \u6b63\u786e&#xff1a;\u76f4\u63a5\u4f7f\u7528\u6beb\u79d2\u7ea7 epoch<\/span><br \/>\nseries<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">append<\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">QPointF<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">QDateTime<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">fromSecsSinceEpoch<\/span><span class=\"token punctuation\">(<\/span>t<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">toMSecsSinceEpoch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> value<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>QDateTime::fromSecsSinceEpoch(t) \u5df2\u5c06\u79d2\u8f6c\u4e3a QDateTime&#xff0c;\u518d\u8c03\u7528 .toMSecsSinceEpoch() \u5f97\u5230\u6beb\u79d2\u7ea7 epoch&#xff0c;\u4e0d\u9700\u8981\u518d\u9664\u4ee5 1000\u3002\u8fd9\u662f\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u7684\u7b2c\u4e00\u5927\u5751\u3002<\/p>\n<h4>Diff 3&#xff1a;\u53cc Y \u8f74\u7ed1\u5b9a<\/h4>\n<p><span class=\"token comment\">\/\/ \u53f3\u8f74\u672a\u7ed1\u5b9a\u65f6\u6807\u9898\u4e0d\u7ed8\u5236<\/span><br \/>\nm_axisRight<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">false<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5207\u6362 series \u7ed1\u5b9a\u7684\u8f74\u65f6&#xff0c;\u52a1\u5fc5\u5148 detach \u518d attach<\/span><br \/>\nseries<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">detachAxis<\/span><span class=\"token punctuation\">(<\/span>m_axisRight<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nseries<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">attachAxis<\/span><span class=\"token punctuation\">(<\/span>m_axisLeft<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>Diff 4&#xff1a;setupUI() \u56fe\u8868\u521d\u59cb\u5316<\/h4>\n<p><span class=\"token comment\">\/\/ QCustomPlot \u65e7\u4ee3\u7801<\/span><br \/>\nm_plot <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QCustomPlot<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plot<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setInteractions<\/span><span class=\"token punctuation\">(<\/span>QCP<span class=\"token double-colon punctuation\">::<\/span>iRangeDrag <span class=\"token operator\">|<\/span> QCP<span class=\"token double-colon punctuation\">::<\/span>iRangeZoom<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plot<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">axisRect<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setupFullAxesBox<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plot<span class=\"token operator\">-&gt;<\/span>xAxis<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">grid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plot<span class=\"token operator\">-&gt;<\/span>yAxis<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">grid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plot<span class=\"token operator\">-&gt;<\/span>legend<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">false<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisRight <span class=\"token operator\">&#061;<\/span> m_plot<span class=\"token operator\">-&gt;<\/span>yAxis2<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ Qt Charts \u65b0\u4ee3\u7801<\/span><br \/>\nm_chart <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QChart<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setTitle<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">legend<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">false<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setTheme<\/span><span class=\"token punctuation\">(<\/span>QChart<span class=\"token double-colon punctuation\">::<\/span>ChartThemeLight<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>m_axisX <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QDateTimeAxis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisX<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setFormat<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;HH:mm:ss&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisX<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setGridLineVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">addAxis<\/span><span class=\"token punctuation\">(<\/span>m_axisX<span class=\"token punctuation\">,<\/span> Qt<span class=\"token double-colon punctuation\">::<\/span>AlignBottom<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>m_axisLeft <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QValueAxis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisLeft<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setRange<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisLeft<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setGridLineVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">addAxis<\/span><span class=\"token punctuation\">(<\/span>m_axisLeft<span class=\"token punctuation\">,<\/span> Qt<span class=\"token double-colon punctuation\">::<\/span>AlignLeft<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>m_axisRight <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QValueAxis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisRight<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setRange<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_axisRight<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setGridLineVisible<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">false<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">addAxis<\/span><span class=\"token punctuation\">(<\/span>m_axisRight<span class=\"token punctuation\">,<\/span> Qt<span class=\"token double-colon punctuation\">::<\/span>AlignRight<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>m_plotView <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token function\">QChartView<\/span><span class=\"token punctuation\">(<\/span>m_chart<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plotView<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setRenderHint<\/span><span class=\"token punctuation\">(<\/span>QPainter<span class=\"token double-colon punctuation\">::<\/span>Antialiasing<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nm_plotView<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setInteractive<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h3>\u2464 \u98ce\u9669\u70b9\u4e0e\u6ce8\u610f\u4e8b\u9879<\/h3>\n<h4>5.1 \u53cc Y \u8f74\u6807\u7b7e<\/h4>\n<p>Qt Charts \u7684\u53f3\u8f74\u6807\u7b7e\u901a\u8fc7 setTitle() \u8bbe\u7f6e&#xff0c;\u4e0e QCustomPlot \u7684 setLabel() \u7b49\u6548\u3002\u53f3\u8f74\u7ed1\u5b9a series \u540e\u6807\u9898\u624d\u4f1a\u663e\u793a\u3002\u5207\u6362\u5de6\u53f3\u8f74\u7ed1\u5b9a\u65f6&#xff0c;\u786e\u4fdd\u5148 detachAxis \u518d attachAxis\u3002<\/p>\n<h4>5.2 \u5386\u53f2\u6a21\u5f0f vs \u5b9e\u65f6\u6a21\u5f0f<\/h4>\n<p>\u5386\u53f2\u6a21\u5f0f\u4f7f\u7528\u7edd\u5bf9\u65f6\u95f4\u6233&#xff08;\u79d2\u7ea7&#xff09;&#xff0c;\u901a\u8fc7 QDateTimeAxis::setRange() \u4f20\u5165\u683c\u5f0f\u5316\u540e\u7684\u8fb9\u754c\u3002\u5b9e\u65f6\u6a21\u5f0f\u4f7f\u7528\u6eda\u52a8\u7a97\u53e3&#xff0c;X \u8f74\u8303\u56f4\u968f\u6570\u636e\u63a8\u8fdb\u3002<\/p>\n<h4>5.3 \u6027\u80fd&#xff1a;replot() \u2192 update()<\/h4>\n<p>Qt Charts \u4f7f\u7528\u573a\u666f\u56fe&#xff08;QGraphicsScene&#xff09;\u81ea\u52a8\u91cd\u7ed8&#xff0c;\u901a\u5e38\u4e0d\u9700\u8981\u624b\u52a8\u8c03\u7528 update()\u3002\u4f46\u5728\u6570\u636e\u66f4\u65b0\u540e\u7acb\u5373\u8c03\u7528 m_chart-&gt;update() \u53ef\u786e\u4fdd\u5373\u65f6\u5237\u65b0\u3002<\/p>\n<h4>5.4 \u56fe\u4f8b\u4f4d\u7f6e<\/h4>\n<p>QCustomPlot \u56fe\u4f8b\u9ed8\u8ba4\u5728\u5e95\u90e8&#xff0c;Qt Charts \u9ed8\u8ba4\u5728\u53f3\u4fa7\u3002\u8c03\u6574\u4f4d\u7f6e&#xff1a;<\/p>\n<p>chart<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">legend<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">setAnchorPosition<\/span><span class=\"token punctuation\">(<\/span>QChart<span class=\"token double-colon punctuation\">::<\/span>LegendAnchorPosition<span class=\"token double-colon punctuation\">::<\/span>LegendBottom<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>5.5 \u6761\u4ef6\u7f16\u8bd1\u4fdd\u62a4<\/h4>\n<p>PLCMonitor \u4f7f\u7528 #ifdef PLC_HAS_CHARTS \u5b8f\u4fdd\u62a4\u56fe\u8868\u9762\u677f\u4ee3\u7801&#xff0c;\u786e\u4fdd\u5728\u6ca1\u6709 Qt Charts \u7684\u6784\u5efa\u73af\u5883\u4e2d\u4e5f\u80fd\u7f16\u8bd1\u901a\u8fc7&#xff1a;<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">ifdef<\/span> <span class=\"token expression\">PLC_HAS_CHARTS<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QChartView&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;QChart&gt;<\/span><\/span><br \/>\n<span class=\"token comment\">\/\/ &#8230;<\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">endif<\/span><\/span><\/p>\n<hr \/>\n<h3>\u2465 \u7ed3\u8bed<\/h3>\n<p>GPL \u5408\u89c4\u662f\u5de5\u4e1a\u8f6f\u4ef6\u5546\u4e1a\u5316\u7684\u5fc5\u7ecf\u4e4b\u8def\u3002QCustomPlot \u867d\u7136\u4f18\u79c0&#xff0c;\u4f46 GPLv3 \u8bb8\u53ef\u8ba9\u5b83\u4e0d\u9002\u5408\u95ed\u6e90\u5546\u4e1a\u4ea7\u54c1\u3002<\/p>\n<p>Qt Charts \u4f5c\u4e3a\u66ff\u4ee3\u65b9\u6848&#xff0c;\u529f\u80fd\u867d\u7136\u7565\u900a\u4e8e QCustomPlot&#xff0c;\u4f46\u5b8c\u5168\u6ee1\u8db3\u5de5\u4e1a\u76d1\u63a7\u8f6f\u4ef6\u7684\u9700\u6c42&#xff0c;\u4e14\u8bb8\u53ef\u8bc1\u53cb\u597d\u3002<\/p>\n<p>\u8fc1\u79fb\u8fc7\u7a0b\u4e0d\u7b97\u590d\u6742&#xff0c;\u5173\u952e\u662f\u5145\u5206\u8bc4\u4f30\u3001\u5206\u6b65\u5b9e\u65bd\u3001\u5168\u9762\u6d4b\u8bd5\u3002\u5e0c\u671b\u672c\u6587\u7684\u7ecf\u9a8c\u80fd\u7ed9\u4f60\u4e00\u4e9b\u53c2\u8003\u3002<\/p>\n<hr \/>\n<p>\u5982\u679c\u60a8\u4e5f\u5728\u5de5\u4e1a\u76d1\u63a7\u9886\u57df\u6709\u7c7b\u4f3c\u9700\u6c42&#xff0c;\u6b22\u8fce\u4ea4\u6d41\u63a2\u8ba8\u6280\u672f\u65b9\u6848\u3002<\/p>\n<p>\u5982\u679c\u89c9\u5f97\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9&#xff0c;\u6b22\u8fce\u70b9\u8d5e\u6536\u85cf&#xff0c;\u4e0b\u671f\u7ee7\u7eed\u5206\u4eab PLCMonitor \u7684\u5176\u4ed6\u8bbe\u8ba1\u5b9e\u8df5\u3002<\/p>\n<p>\u9879\u76ee\u5730\u5740&#xff1a;https:\/\/github.com\/freddiezhang1990\/plcmonitor<\/p>\n<p>\u6b22\u8fce\u4e0b\u8f7d V2.0 \u5b89\u88c5\u5305\u8bd5\u7528&#xff0c;\u5e76\u63d0\u51fa\u5b9d\u8d35\u610f\u89c1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Qt \u5de5\u4e1a\u8f6f\u4ef6 GPLv3 \u6c61\u67d3\u5371\u673a&#xff1a;QCustomPlot \u2192 Qt Charts \u8fc1\u79fb\u5b9e\u6218\u5de5\u4e1a\u8f6f\u4ef6\u8981\u5546\u4e1a\u5316&#xff0c;\u8bb8\u53ef\u8bc1\u5408\u89c4\u662f\u5fc5\u7ecf\u4e4b\u8def\u3002QCustomPlot \u7684 GPLv3 \u8bb8\u53ef\u7ed9\u95ed\u6e90\u4ea7\u54c1\u57cb\u4e0b\u4e86\u9690\u60a3\u3002\u672c\u6587\u8be6\u8ff0 PLCMonitor \u5982\u4f55\u4ece QCustomPlot \u8fc1\u79fb\u5230 Qt Charts&#xff08;LGPLv3&#xff09;&#xff0c;\u6d88\u9664 GPL \u6c61\u67d3&#xff0c;\u4ee5\u53ca\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u7684 API \u6620\u5c04\u548c\u5751\u70b9\u3002<br \/>\n\u514d\u8d23\u58f0\u660e&#xff1a;\u672c\u6587<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,3750],"topic":[],"class_list":["post-102190","post","type-post","status-publish","format-standard","hentry","category-server","tag-c","tag-mfc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/102190.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Qt \u5de5\u4e1a\u8f6f\u4ef6 GPLv3 \u6c61\u67d3\u5371\u673a&#xff1a;QCustomPlot \u2192 Qt Charts \u8fc1\u79fb\u5b9e\u6218\u5de5\u4e1a\u8f6f\u4ef6\u8981\u5546\u4e1a\u5316&#xff0c;\u8bb8\u53ef\u8bc1\u5408\u89c4\u662f\u5fc5\u7ecf\u4e4b\u8def\u3002QCustomPlot \u7684 GPLv3 \u8bb8\u53ef\u7ed9\u95ed\u6e90\u4ea7\u54c1\u57cb\u4e0b\u4e86\u9690\u60a3\u3002\u672c\u6587\u8be6\u8ff0 PLCMonitor \u5982\u4f55\u4ece QCustomPlot \u8fc1\u79fb\u5230 Qt Charts&#xff08;LGPLv3&#xff09;&#xff0c;\u6d88\u9664 GPL \u6c61\u67d3&#xff0c;\u4ee5\u53ca\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u7684 API \u6620\u5c04\u548c\u5751\u70b9\u3002 \u514d\u8d23\u58f0\u660e&#xff1a;\u672c\u6587\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/102190.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-08T01:57:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/102190.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/102190.html\",\"name\":\"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-08T01:57:08+00:00\",\"dateModified\":\"2026-09-08T01:57:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/102190.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/102190.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/102190.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/102190.html","og_locale":"zh_CN","og_type":"article","og_title":"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Qt \u5de5\u4e1a\u8f6f\u4ef6 GPLv3 \u6c61\u67d3\u5371\u673a&#xff1a;QCustomPlot \u2192 Qt Charts \u8fc1\u79fb\u5b9e\u6218\u5de5\u4e1a\u8f6f\u4ef6\u8981\u5546\u4e1a\u5316&#xff0c;\u8bb8\u53ef\u8bc1\u5408\u89c4\u662f\u5fc5\u7ecf\u4e4b\u8def\u3002QCustomPlot \u7684 GPLv3 \u8bb8\u53ef\u7ed9\u95ed\u6e90\u4ea7\u54c1\u57cb\u4e0b\u4e86\u9690\u60a3\u3002\u672c\u6587\u8be6\u8ff0 PLCMonitor \u5982\u4f55\u4ece QCustomPlot \u8fc1\u79fb\u5230 Qt Charts&#xff08;LGPLv3&#xff09;&#xff0c;\u6d88\u9664 GPL \u6c61\u67d3&#xff0c;\u4ee5\u53ca\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u7684 API \u6620\u5c04\u548c\u5751\u70b9\u3002 \u514d\u8d23\u58f0\u660e&#xff1a;\u672c\u6587","og_url":"https:\/\/www.wsisp.com\/helps\/102190.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-08T01:57:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/102190.html","url":"https:\/\/www.wsisp.com\/helps\/102190.html","name":"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-08T01:57:08+00:00","dateModified":"2026-09-08T01:57:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/102190.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/102190.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/102190.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"GPL\u6c61\u67d3\u5371\u673a_QCustomPlot\u8fc1\u79fb\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/102190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=102190"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/102190\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=102190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=102190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=102190"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=102190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}