@@ -1,58 +1,73 | |||||
1 | /*! |
|
1 | /*! | |
2 | \page introduction.html |
|
2 | \page introduction.html | |
3 | \title QtCommercial Charts Introduction |
|
3 | \title QtCommercial Charts Introduction | |
4 | \keyword Introduction |
|
4 | \keyword Introduction | |
5 |
|
5 | |||
6 | You can obtain the QtCommercial Charts package from \l {http://www.digia.com/en/Qt/Log-in-Customer-Portal/} {Customer portal}. |
|
6 | You can obtain the QtCommercial Charts package from \l {http://www.digia.com/en/Qt/Log-in-Customer-Portal/} {Customer portal}. | |
7 |
|
7 | |||
8 | Compiling: |
|
8 | Compiling: | |
9 | \code |
|
9 | \code | |
10 | qmake CONFIG+=release |
|
10 | qmake CONFIG+=release | |
11 | make |
|
11 | make | |
12 | make install |
|
12 | make install | |
13 | \endcode |
|
13 | \endcode | |
14 |
|
14 | |||
15 | Depending on the OS and the compiler you are using "make" might need to be replaced with another command like: nmake, mingw32-make, etc |
|
15 | Depending on the OS and the compiler you are using "make" might need to be replaced with another command like: nmake, mingw32-make, etc. | |
16 |
|
16 | |||
17 | \bold {New project} |
|
17 | On Windows platforms both debug and release configurations are built by default at the same time. | |
|
18 | To build both at the same time on other platforms invoke the following command: | |||
18 |
|
19 | |||
19 | Create a new project in a usual way and then add to your project's *.pro file following line |
|
|||
20 | \code |
|
20 | \code | |
21 | CONFIG += qtcommercialchart |
|
21 | make all | |
|
22 | \endcode | |||
|
23 | ||||
|
24 | Compiling as a static library (lib only): | |||
|
25 | \code | |||
|
26 | qmake CONFIG+=staticlib | |||
|
27 | make | |||
|
28 | make install | |||
22 | \endcode |
|
29 | \endcode | |
23 |
|
30 | |||
24 | or if you have not installed QCharts afer building: |
|
31 | \bold {New project} | |
|
32 | ||||
|
33 | Create a new project in a usual way and then add to your project's *.pro file following line: | |||
25 |
|
34 | |||
26 | On *unix: |
|
|||
27 | \code |
|
35 | \code | |
28 | INCLUDEPATH += <path_to_charts_folder>/include |
|
36 | CONFIG += qtcommercialchart | |
29 | LIBS += -L<path_to_charts_folder>/lib -lQtCommercialChart |
|
|||
30 | \endcode |
|
37 | \endcode | |
31 |
|
38 | |||
32 | On windows: |
|
39 | Or if you have not installed charts after building: | |
33 |
|
40 | |||
34 | On mac: |
|
41 | \code | |
|
42 | CHARTSLIB = QtCommercialChart | |||
|
43 | CONFIG(debug, debug|release) { | |||
|
44 | mac: CHARTSLIB = $$join(CHARTSLIB,,,_debug) | |||
|
45 | win32: CHARTSLIB = $$join(CHARTSLIB,,,d) | |||
|
46 | } | |||
|
47 | INCLUDEPATH += <path_to_charts_folder>/include | |||
|
48 | LIBS += -L<path_to_charts_folder>/lib -l$$CHARTSLIB | |||
|
49 | \endcode | |||
35 |
|
50 | |||
36 | \bold {Widget project} |
|
51 | \bold {Widget project} | |
37 |
|
52 | |||
38 | To use the QCharts classes add QtCommercialChart namespace macro in your header file. |
|
53 | To use the QCharts classes add QtCommercialChart namespace macro in your header file. | |
39 | \code |
|
54 | \code | |
40 | #include<QWidget> |
|
55 | #include<QWidget> | |
41 | #include<QChartView> |
|
56 | #include<QChartView> | |
42 |
|
57 | |||
43 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
58 | QTCOMMERCIALCHART_USE_NAMESPACE | |
44 |
|
59 | |||
45 | class ExampleWidget : public QWidget |
|
60 | class ExampleWidget : public QWidget | |
46 | \endcode |
|
61 | \endcode | |
47 |
|
62 | |||
48 | \bold {QML project} |
|
63 | \bold {QML project} | |
49 |
|
64 | |||
50 | Add an import line to your *.qml file: |
|
65 | Add an import line to your *.qml file: | |
51 | \code |
|
66 | \code | |
52 | import QtCommercial.Chart 1.0 |
|
67 | import QtCommercial.Chart 1.0 | |
53 | \endcode |
|
68 | \endcode | |
54 |
|
69 | |||
55 | \raw HTML |
|
70 | \raw HTML | |
56 | \endraw |
|
71 | \endraw | |
57 |
|
72 | |||
58 | */ |
|
73 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now