The thing I would try is this:
1) rename the .pro file you have to something like application.pro
2) create a new .pro file with the original name with this content
TEMPLATE = subdirs
SUBDIRS = application.pro
TEMPLATE = subdirs
SUBDIRS = application.pro
To copy to clipboard, switch view to plain text mode
You should still be able to built the application as before
3) Create a library project as a subdirectory of your main project
4) Add the library directory to SUBDIRS, e.g.
SUBDIRS = mylibrary application.pro
SUBDIRS = mylibrary application.pro
To copy to clipboard, switch view to plain text mode
Alternatively you create a new top level directory with a SUBDIRS .pro file and both the application project and library project as sibling subdirectories
SUBDIRS = mylibray orginalprojectdir
SUBDIRS = mylibray orginalprojectdir
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks