QtCreator not handling nested projects anymore?

  • Hi,

    I've used QtCreator in the past as well, and I downloaded the latest version, 2.2.0 for Windows. I opened my .pro project file, which is a nested project (has a SUBDIRS statement). previously, when opening such a .pro file, QtCreator would display all the nexted projects, and then all the source files in the respective nested projects would be available.

    But now, only the .pro file is opened, but none of the nested files. Calling build will build everything, but when there are compilation warnings or errors - QtCreator cannot find the source files (as the relative path reported by gcc is not based on the outmost directory of the project).

    How can one get the old functionality back, which was quite fine?


  • Moderators

    there is a similar thread "here ":http://developer.qt.nokia.com/forums/viewthread/2438

    hope this helps.

  • [quote author="Eddy" date="1309252599"]there is a similar thread "here ":http://developer.qt.nokia.com/forums/viewthread/2438

    hope this helps.[/quote]

    thanks, but that thread is about SUBDIRS not working. I have qmake build my project fine, the only thing is that QtCreator won't display the SUBDIR projects & files included in them...

  • I know this probably won't help you much, but I'm using a subdirs project, and haven't had any problems with it in Qt Creator 2.2. The one thing I've had to do is disable shadow builds, but I think that's just because of how my projects are organised, it should work if you have them in a tree with the subdirs project at the top.

  • hm, interesting, wonder why it doesn't work with my project :(
    (yes, I also disabled shadow builds)

  • Moderators

    Could you post you pro file?
    So we can look into it.

  • [quote author="Eddy" date="1309253782"]Could you post you pro file?
    So we can look into it.[/quote]

    sure, here it is:


    Copyright (c) 2011 Tyrell Corporation.

    The contents of this file are subject to the Mozilla Public License

    Version 1.1 (the "License"); you may not use this file except in

    compliance with the License. You may obtain a copy of the License at


    Software distributed under the License is distributed on an "AS IS"

    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the

    License for the specific language governing rights and limitations

    under the License.

    The Original Code is an implementation of the Metaverse eXchange Protocol.

    The Initial Developer of the Original Code is Akos Maroy.

    All Rights Reserved.

    Contributor(s): Akos Maroy.

    Alternatively, the contents of this file may be used under the terms

    of the Affero General Public License (the "AGPL"), in which case the

    provisions of the AGPL are applicable instead of those

    above. If you wish to allow use of your version of this file only

    under the terms of the AGPL and not to allow others to use

    your version of this file under the MPL, indicate your decision by

    deleting the provisions above and replace them with the notice and

    other provisions required by the AGPL. If you do not delete

    the provisions above, a recipient may use your version of this file

    under either the MPL or the AGPL.

    win32-msvc* {
    CONFIG += ordered
    TEMPLATE = subdirs
    unix|win32-g++* {
    TEMPLATE = subdirs
    SUBDIRS = src

    cccc.target = cccc
    cccc.commands = cccc --outdir=doc/cccc
    find src/libmxp -name "*.h" -o -name "*.cxx"
    QMAKE_CLEAN += doc/cccc/*

    cppcheck.target = cppcheck
    cppcheck.commands = cppcheck --quiet --all --verbose --xml
    -I src//include -I lib//include src 2> tmp/cppcheck.xml
    QMAKE_EXTRA_TARGETS += cppcheck
    QMAKE_CLEAN += tmp/cppcheck.xml

    doxygen.target = doxygen
    doxygen.commands = doxygen etc/doxygen.config
    QMAKE_EXTRA_TARGETS += doxygen
    QMAKE_CLEAN += doc/doxygen/html/*

    test.CONFIG = recursive
    test.target = test
    test.recurse = $$SUBDIRS
    test.recurse_target = test
    unix {
    test.commands = bin/generate_unittest_report.sh
    QMAKE_CLEAN += doc/unittests/*
    QMAKE_CLEAN += tmp/tests.xml

    coverage.CONFIG += recursive
    coverage.recurse = $$SUBDIRS
    coverage.recurse_target = coverage
    QMAKE_EXTRA_TARGETS += coverage

    coverage_report_pre.target = coverage_report_pre
    coverage_report_pre.depends =
    coverage_report_pre.commands = bin/initialize_coverage_report.sh
    QMAKE_EXTRA_TARGETS += coverage_report_pre

    coverage_report.target = coverage_report
    coverage_report.depends = coverage_report_pre test
    coverage_report.commands = bin/generate_coverage_report.sh
    QMAKE_EXTRA_TARGETS += coverage_report
    QMAKE_CLEAN += tmp/*.info

    profile.CONFIG += recursive
    profile.recurse = $$SUBDIRS
    profile.recurse_target = profile
    QMAKE_EXTRA_TARGETS += profile

    profile_report.CONFIG += recursive
    profile_report.recurse = $$SUBDIRS
    profile_report.recurse_target = profile_report
    profile_report.depends = test
    profile_report.commands = bin/generate_profile_report.sh
    QMAKE_EXTRA_TARGETS += profile_report
    QMAKE_CLEAN += doc/profile/test_*.html

    perftools.CONFIG += recursive
    perftools.recurse = $$SUBDIRS
    perftools.recurse_target = perftools
    QMAKE_EXTRA_TARGETS += perftools


  • Try putting the TEMPLATE = subdirs outside the condition

  • [quote author="loladiro" date="1309254973"]Try putting the TEMPLATE = subdirs outside the condition[/quote]

    indeed - now it works. thanks!

    (interestingly, the same file used to work fine in older versions of QtCreator)

  • Moderators

    [quote author="akos.maroy" date="1309255230"] (interestingly, the same file used to work fine in older versions of QtCreator)[/quote]

    Did you do this on the same os. maybe it's 64 bit now or other differences?
    There must be a logical explanation.

  • [quote author="Eddy" date="1309255504"]
    [quote author="akos.maroy" date="1309255230"] (interestingly, the same file used to work fine in older versions of QtCreator)[/quote]

    Did you do this on the same os. maybe it's 64 bit now or other differences?
    There must be a logical explanation.[/quote]

    same os (Windows 7 64 bit), different QtCreator.

    well, anyway, the good thing is that it works :)

Log in to reply

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