equal
deleted
inserted
replaced
36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
36 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
37 ** $QT_END_LICENSE$ |
37 ** $QT_END_LICENSE$ |
38 ** |
38 ** |
39 ****************************************************************************/ |
39 ****************************************************************************/ |
40 //![0] |
40 //![0] |
41 #include "musician.h" |
41 #include "piechart.h" |
42 #include <qdeclarative.h> |
42 #include <qdeclarative.h> |
43 #include <QDeclarativeView> |
43 #include <QDeclarativeView> |
44 #include <QApplication> |
44 #include <QApplication> |
45 |
45 |
46 int main(int argc, char *argv[]) |
46 int main(int argc, char *argv[]) |
47 { |
47 { |
48 QApplication app(argc, argv); |
48 QApplication app(argc, argv); |
49 |
49 |
50 qmlRegisterType<Musician>("Music", 1, 0, "Musician"); |
50 qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); |
51 |
51 |
52 QDeclarativeView view; |
52 QDeclarativeView view; |
53 view.setSource(QUrl::fromLocalFile("app.qml")); |
53 view.setSource(QUrl::fromLocalFile("app.qml")); |
54 view.show(); |
54 view.show(); |
55 return app.exec(); |
55 return app.exec(); |