<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><br><br>Message: 5<br>Date: Fri, 30 Aug 2013 16:03:49 +0200<br>From: "Vincent R." <<a href="mailto:forumer@smartmobili.com">forumer@smartmobili.com</a>><br>Subject: [Interest] My First approach with QT 5.1 on MacOS : very<br><span class="Apple-tab-span" style="white-space:pre">    </span>disappointing<br>To: <<a href="mailto:interest@qt-project.org">interest@qt-project.org</a>><br>Message-ID: <<a href="mailto:e7e13b42c24a503970fa2b62f60d3d63@smartmobili.com">e7e13b42c24a503970fa2b62f60d3d63@smartmobili.com</a>><br>Content-Type: text/plain; charset=UTF-8; format=flowed<br><br>Hi,<br><br>it's been a long time since I tried QT and I read some very interesting <br>articles about new version<br>of QT, QTQuick 2.x, desktop controls, better QTCreator, …</blockquote><div><br></div><div>I consider Qt Quick on the desktop to be experimental at best. QML is designed for mobile and it shows.</div><div><br></div><div>They've just added desktop components to the distribution but its missing critical things like tree views and there are no plans to add them.</div><div><br></div><div>I've tried it a few times and gone through the examples but from the number of errors, I get the impression that no-one has really tried it on mac.</div><div><br></div><div>It's pretty easy to add animation (if you really, really need it) to traditional widgets thanks to QStateMachine and QGraphicsView is pretty awesome.</div><div><br></div><blockquote type="cite">So I have downloaded the latest version of QT (5.1) on MacOS mountain <br>Lion and I tried to find an good tutorial.<br>I found this one :<br><a href="http://www.ics.com/blog/integrating-c-qml?page=1">http://www.ics.com/blog/integrating-c-qml?page=1</a><br></blockquote><div><br></div>That's not even an official Qt tutorial.</div><div><br><blockquote type="cite">I have downloaded the source code, started Creator and clicked on the <br>Debug button but of course it doesn't<br>work and I get the following errors :<br><br>/Users/j.doe/Developer/Qt5.1.0/5.1.0/clang_64/include/QtCore/qlist.h:52: <br>erreur : 'initializer_list' file not found<br>#include <initializer_list><br>          ^<br><br></blockquote><div><br></div><div>Simply add CONFIG += C++11. Those other articles are out of date.</div><br><blockquote type="cite">Ok So I found the following thread on SO :<br><a href="http://stackoverflow.com/questions/15446207/compile-error-when-trying-to-compile-a-qt-project">http://stackoverflow.com/questions/15446207/compile-error-when-trying-to-compile-a-qt-project</a><br><br>So I have edited the file qmlc++.pro to add -stdlib=libc+ and CONFIG <br>+=c++11 (as shown below)<br><br>qmlc++.pro:<br>----------<br>lessThan(QT_MAJOR_VERSION, 5): error(This project requires Qt 5 or <br>later)<br><br># Needed by g++ for C++11 support. Adjust as needed for other <br>compilers.<br>QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc+<br>CONFIG +=c++11<br><br>TEMPLATE = app<br>TARGET = qmlc++<br>QT += qml quick widgets<br>HEADERS += KeyGenerator.h<br>SOURCES += main.cpp KeyGenerator.cpp<br>OTHER_FILES += main.qml<br>---------------------------------------<br><br>So now everything compiles fine, I only have the following warnings:<br>directory not found for option <br>'-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtdeclarative/lib'<br>directory not found for option <br>'-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtbase/lib'<br>directory not found for option <br>'-F/Users/j.doe/Developer/Qt5.1.0//5.1.0/clang_64/qtjsbackend/lib'<br></blockquote><div><br></div><div><br></div><div>This is QTBUG-28336 and is supposed to be fixed in 5.1.1. There is a simple work around for earlier versions in the comments:</div><div><a href="https://bugreports.qt-project.org/browse/QTBUG-28336">https://bugreports.qt-project.org/browse/QTBUG-28336</a></div><br><blockquote type="cite"><br>Then when I try to run the application it cannot find the main qml file <br>:<br><br>D?marrage de <br>/Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/qmlc++...QML <br>debugging is enabled. Only use this in a safe environment.<br><a href="file:///Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/main.qml:-1">file:///Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/main.qml:-1</a> <br>File not found<br><br>/Users/j.doe/Downloads/build-qmlc++-Desktop_Qt_5_1_0_clang_64bit-Debug/qmlc++.app/Contents/MacOS/qmlc++ <br>a quitt? avec le code 255<br><br></blockquote><div><br></div><div>Can't help you there. See my previous comment regarding Qt Quick.</div><br><blockquote type="cite">So I finally gave up for now and I tried to create a new hello world <br>application, then I wanted to see the option to import an external <br>library<br>into the project so I right-clicked on the project -> Add library... <br>then a dialog appeared but in the mean time I changed my mind and I <br>wanted to do something else before inserting a libray BUT WHERE IS THE <br>CANCEL BUTTON ? I have to launch process explorer to quit this dialog.</blockquote><blockquote type="cite"><br>UPDATE : I found that to quit the import lib dialog I can press Esc key <br>but to me this is ugly, it shouldn't be difficult to rename the "Go <br>back" button into Cancel when you are on the first state of the <br>dialog…</blockquote><div><br></div><div>Or you could have just closed the dialog with the standard red button in the title….</div><br><blockquote type="cite">I am a bit disappointed.<br><br>I found this problem withing 10 minutes so now I am a bit afraid to <br>keep on testing.<br></blockquote></div><br><div>Qt has come a long way on the mac recently. Qt/Mac has gone from being the poor relation (shitty installer, slow widgets) to actually being</div><div>pretty decent, especially with the LLVM and LLDB integration. Of course I'm referring to Qt with widgets via C++.</div><div><br></div><div>See previous comment regarding Qt Quick.</div></body></html>