[Interest] Interest Digest, Vol 23, Issue 76

Danny Price deepblue842 at googlemail.com
Fri Aug 30 18:32:03 CEST 2013


> 
> 
> Message: 5
> Date: Fri, 30 Aug 2013 16:03:49 +0200
> From: "Vincent R." <forumer at smartmobili.com>
> Subject: [Interest] My First approach with QT 5.1 on MacOS : very
> 	disappointing
> To: <interest at qt-project.org>
> Message-ID: <e7e13b42c24a503970fa2b62f60d3d63 at smartmobili.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> 
> 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, …

I consider Qt Quick on the desktop to be experimental at best. QML is designed for mobile and it shows.

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.

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.

It's pretty easy to add animation (if you really, really need it) to traditional widgets thanks to QStateMachine and QGraphicsView is pretty awesome.

> 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

That's not even an official Qt tutorial.

> 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>
>          ^
> 

Simply add CONFIG += C++11. Those other articles are out of date.

> 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'


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:
https://bugreports.qt-project.org/browse/QTBUG-28336

> 
> 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
> 

Can't help you there. See my previous comment regarding Qt Quick.

> 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…

Or you could have just closed the dialog with the standard red button in the title….

> I am a bit disappointed.
> 
> I found this problem withing 10 minutes so now I am a bit afraid to 
> keep on testing.

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
pretty decent, especially with the LLVM and LLDB integration. Of course I'm referring to Qt with widgets via C++.

See previous comment regarding Qt Quick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130830/41684a95/attachment.html>


More information about the Interest mailing list