前提
qtchart 里的README文件(注意紅色標記處)(本人翻譯不行。多多見諒,也可以在評論里糾正( ⊙ o ⊙ ))
---------------
Qt Charts 5.7.0
---------------
Qt Charts module provides a set of easy to use chart components. It uses
the Qt Graphics View Framework, therefore charts can be easily integrated
to modern user interfaces.
System Requirements
===================
- Qt 5.4 or newer (Qt5.4或者更高的版本)
- For QML applications QtQuick 2 is required (對於QML程序,QtQuick2是必須的)
- Manipulating Qt Charts graphs with QML Designer requires Qt Creator 3.3 or newer (Qt Creator 3.3 或者更高的版本)
Building
========
Configure the project with qmake:
qmake
After running qmake, build the project with make:
(Linux) make
(Windows with MinGw) mingw32-make
(Windows with Visual Studio) nmake
(OS X) make
The above generates the default makefiles for your configuration, which is typically
the release build if you are using precompiled binary Qt distribution. To build both
debug and release, or one specifically, use one of the following qmake lines instead.
For debug builds:
qmake CONFIG+=debug
make
or
qmake CONFIG+=debug_and_release
make debug
For release builds:
qmake CONFIG+=release
make
or
qmake CONFIG+=debug_and_release
make release
For both builds (Windows/OS X only):
qmake CONFIG+="debug_and_release build_all"
make
After building, install the module to your Qt directory:
make install
If you want to uninstall the module:
make uninstall
Building as a statically linked library
=======================================
The same as above applies, you will just have to add static to the CONFIG:
qmake CONFIG+=static
Documentation
=============
The documentation can be generated with:
make docs
The documentation is generated into the doc folder under the build folder.
Both Qt Assistant (qtcharts.qch) and in HTML format (qtcharts subfolder)
documentation is generated.
Please refer to the generated documentation for more information:
doc/qtcharts/index.html
Known issues
============
- Zooming too far or too close may eventually freeze the zooming and scrolling.
Qt Charts 5.7.0
---------------
Qt Charts module provides a set of easy to use chart components. It uses
the Qt Graphics View Framework, therefore charts can be easily integrated
to modern user interfaces.
System Requirements
===================
- Qt 5.4 or newer (Qt5.4或者更高的版本)
- For QML applications QtQuick 2 is required (對於QML程序,QtQuick2是必須的)
- Manipulating Qt Charts graphs with QML Designer requires Qt Creator 3.3 or newer (Qt Creator 3.3 或者更高的版本)
Building
========
Configure the project with qmake:
qmake
After running qmake, build the project with make:
(Linux) make
(Windows with MinGw) mingw32-make
(Windows with Visual Studio) nmake
(OS X) make
The above generates the default makefiles for your configuration, which is typically
the release build if you are using precompiled binary Qt distribution. To build both
debug and release, or one specifically, use one of the following qmake lines instead.
For debug builds:
qmake CONFIG+=debug
make
or
qmake CONFIG+=debug_and_release
make debug
For release builds:
qmake CONFIG+=release
make
or
qmake CONFIG+=debug_and_release
make release
For both builds (Windows/OS X only):
qmake CONFIG+="debug_and_release build_all"
make
After building, install the module to your Qt directory:
make install
If you want to uninstall the module:
make uninstall
Building as a statically linked library
=======================================
The same as above applies, you will just have to add static to the CONFIG:
qmake CONFIG+=static
Documentation
=============
The documentation can be generated with:
make docs
The documentation is generated into the doc folder under the build folder.
Both Qt Assistant (qtcharts.qch) and in HTML format (qtcharts subfolder)
documentation is generated.
Please refer to the generated documentation for more information:
doc/qtcharts/index.html
Known issues
============
- Zooming too far or too close may eventually freeze the zooming and scrolling.
編譯
首先我們需要一份Qt Chart 5.7.0源碼(源碼於 上海Qt開發聯盟 或 QT&C++編程愛好者 群共享中可見)

○: 第一個是已經編譯好的dll,可直接下載然后跳轉到安裝步驟
○: 第二個是qt chart 幫助文檔
○: 第三個就是我們需要的源文件,點擊下載它
下載解壓后,我們輕松的看到這樣一個畫面:

然后呢,我們雙擊qtchart.pro文件,進入Qt Creator

很簡單,點擊運行按鈕,選擇release,然后進行編譯:

注意:
○: 當你遇到以下情況時,下載
windows下perl的安裝和腳本的運行安裝

安裝:
編譯結束,我們能看到:


點擊開始菜單→ Qt 5.5.1(你的Qt版本)→ 5.5→ MinGW 4.9.2 (32-bit)(你的MinGW版本)→ Qt 5.5 for Desktop (MinGW 4.9.2 32 bit)
輸入 cd /d 你的qtcharts編譯好的文件路徑
回車
mingw32-make install
回車

然后就是下面一大串的信息。。。

測試 (此步驟選看)
待復制文件完畢后,打開qtcharts源文件下的example文件夾里的.pro文件
結果如下圖:


點擊運行,運行結束后如下圖所示:

然后你就可以看到如第二幅圖qtcharts的樣子了。
http://blog.csdn.net/accelerated1987/article/details/50563856