Hi, it's been a long time since I tried QT and I read some very interesting articles about new version of QT, QTQuick 2.x, desktop controls, better QTCreator, ... So I have downloaded the latest version of QT (5.1) on MacOS mountain Lion and I tried to find an good tutorial. I found this one : http://www.ics.com/blog/integrating-c-qml?page=1
I have downloaded the source code, started Creator and clicked on the Debug button but of course it doesn't work and I get the following errors : /Users/j.doe/Developer/Qt5.1.0/5.1.0/clang_64/include/QtCore/qlist.h:52: erreur : 'initializer_list' file not found #include <initializer_list> ^ Ok So I found the following thread on SO : http://stackoverflow.com/questions/15446207/compile-error-when-trying-to-compile-a-qt-project So I have edited the file qmlc++.pro to add -stdlib=libc+ and CONFIG +=c++11 (as shown below) qmlc++.pro: ---------- lessThan(QT_MAJOR_VERSION, 5): error(This project requires Qt 5 or later) # Needed by g++ for C++11 support. Adjust as needed for other compilers. QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc+ CONFIG +=c++11 TEMPLATE = app TARGET = qmlc++ QT += qml quick widgets HEADERS += KeyGenerator.h SOURCES += main.cpp KeyGenerator.cpp OTHER_FILES += main.qml --------------------------------------- So now everything compiles fine, I only have the following warnings: directory not found for option '-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtdeclarative/lib' directory not found for option '-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtbase/lib' directory not found for option '-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtjsbackend/lib' Then when I try to run the application it cannot find the main qml file : Démarrage de /Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/qmlc++...QML debugging is enabled. Only use this in a safe environment. file:///Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/main.qml:-1 File not found /Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/qmlc++ a quitté avec le code 255 So I finally gave up for now and I tried to create a new hello world application, then I wanted to see the option to import an external library into the project so I right-clicked on the project -> Add library... then a dialog appeared but in the mean time I changed my mind and I wanted to do something else before inserting a libray BUT WHERE IS THE CANCEL BUTTON ? I have to launch process explorer to quit this dialog. UPDATE : I found that to quit the import lib dialog I can press Esc key but to me this is ugly, it shouldn't be difficult to rename the "Go back" button into Cancel when you are on the first state of the dialog... I am a bit disappointed. I found this problem withing 10 minutes so now I am a bit afraid to keep on testing. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest