4.7.2 Installed on Mac OSX, but where is it?



  • There's something fundamental I am not getting right.

    I installed Qt 4.7.2 (framework). I removed the 4.7.1 folder I built myself from source code. I have no idea where 4.7.2 went after I installed it. I have no idea what I should tell me QCreator to work with it. I does find "qmake" automatically in /usr/bin/ - and it tells me that it's "4.7.2" (in my prefereces/qt4" page), but nothing else.

    I try to compile a tiny app consisting of an empty window with a QDeclartiveView inside of it I created with the internal form editor of QCreator 2.1, The auto-generated "#include <QtDeclarative/QDeclarativeView>" fails compilation with file not found.

    Where would I find that file? how do I point Qt at the folder where this is included?



  • In Qt Creator, you must make visible the newly installed Qt version. Go to preferences, Qt4 and hit the "+" button, then enter the path to your qmake (/usr/bin/qmake), Creator handles the rest (you must enter a version name if that's not filled automagically).

    You can check where the parts are with calling

    @qmake -query@

    on the command line.



  • I am getting this:

    @/usr/include - Fri Apr 01 10:51:16: qmake -query
    QT_INSTALL_PREFIX:/
    QT_INSTALL_DATA:/usr/local/Qt4.7
    QT_INSTALL_DOCS:/Developer/Documentation/Qt
    QT_INSTALL_HEADERS:/usr/include
    QT_INSTALL_LIBS:/Library/Frameworks
    QT_INSTALL_BINS:/Developer/Tools/Qt
    QT_INSTALL_PLUGINS:/Developer/Applications/Qt/plugins
    QT_INSTALL_IMPORTS:/Developer/Applications/Qt/imports
    QT_INSTALL_TRANSLATIONS:/Developer/Applications/Qt/translations
    QT_INSTALL_CONFIGURATION:/Library/Preferences/Qt
    QT_INSTALL_EXAMPLES:/Developer/Examples/Qt/
    QT_INSTALL_DEMOS:/Developer/Examples/Qt/Demos
    QMAKE_MKSPECS:/usr/local/Qt4.7/mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.7.2
    @

    Looking again, it seems I am getting a link error on QDeclarativeView

    @
    Undefined symbols:
    "QDeclarativeView::QDeclarativeView(QWidget*)", referenced from:
    Ui_MainWindow::setupUi(QMainWindow*) in MainWindow.o
    @

    Do I have to include the QT_INSTALL_LIBS path in my *.pro file? I would think not, that these are automatically assumed. So why the link error?



  • Did you add

    @
    QT += declarative
    @

    to your .pro file?



  • Thanks. that did it :-)

    I assume I should have been looking for this: http://qt.nokia.com/products/library/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.