Adding the library to Qt app projects

After generating the dynamic library file for QtLibrary, you can add the library to the projects of Qt apps to make the library functionality available to those apps.

In this tutorial, we modify the project for QtApp (which we created in Creating and running Qt apps) to include our new library.
To add the library to QtApp:
  1. Click the Edit icon on the left side, right-click the QtApp folder in the Projects view, then choose Set "QtApp" as Active Project in the popup menu.
  2. Right-click the QtApp folder again, then choose Add Library...
  3. In the Type page of the resulting dialog, select External Library, then click Next.
  4. On the Library file line in the Details page, click the Browse button (shown on the right) to open the file selector.
  5. Navigate to the build directory of QtLibrary, select libQtLibrary.so, then click Open.
  6. On the Include path line, click Browse to open the file selector.
  7. Navigate to and select the source directory of QtLibrary, then click Open.
  8. Under the Platform heading, uncheck the boxes for Mac and Windows, then click Next.
    This last step is necessary because QNX is a POSIX-compliant OS so it uses the Linux linking convention.
  9. On the Summary page, click Finish.
The QtLibrary library is now part of QtApp, meaning the library's functions can be called from QtApp code.