I use a directory structure like this:
/trunk
--/build
--/doc
--/res
--/src
----/include
/trunk
--/build
--/doc
--/res
--/src
----/include
To copy to clipboard, switch view to plain text mode
and use a .pro file like:
SRCDIR = ../src
INCDIR = $$SRCDIR/include
RESDIR = ../res
QT = core gui network xml
SOURCES += $$SRCDIR/main.cpp
SOURCES += $$SRCDIR/appsettings.cpp
SOURCES += $$SRCDIR/mainwindow.cpp
SOURCES += $$SRCDIR/settingsdialog.cpp
HEADERS += $$INCDIR/appsettings.h
HEADERS += $$INCDIR/mainwindow.h
HEADERS += $$INCDIR/settingsdialog.h
FORMS += $$RESDIR/mainwindow.ui
FORMS += $$RESDIR/settingsdialog.ui
RESOURCES = $$RESDIR/resources.qrc
SRCDIR = ../src
INCDIR = $$SRCDIR/include
RESDIR = ../res
QT = core gui network xml
SOURCES += $$SRCDIR/main.cpp
SOURCES += $$SRCDIR/appsettings.cpp
SOURCES += $$SRCDIR/mainwindow.cpp
SOURCES += $$SRCDIR/settingsdialog.cpp
HEADERS += $$INCDIR/appsettings.h
HEADERS += $$INCDIR/mainwindow.h
HEADERS += $$INCDIR/settingsdialog.h
FORMS += $$RESDIR/mainwindow.ui
FORMS += $$RESDIR/settingsdialog.ui
RESOURCES = $$RESDIR/resources.qrc
To copy to clipboard, switch view to plain text mode
and save this in the build directory.
Of course, this .pro file was created manually, but I think this is doable for most projects. You could write a simple script that creates a .pro file like this for larger projects.
Bookmarks