Creating a GUI linked to a core shared library
The gallery-core
shared library is now ready. Let's see how to create the desktop GUI project. We will create a Qt Widgets application sub-project called gallery-desktop
. Only the first steps differ from a classic Qt Widgets application. Right-click on the main project, and select ch04-gallery-desktop | New subproject | Application | Qt Widgets Application | Choose.
You will get a nice multi-projects hierarchy like this:
It is now time to link this gallery-desktop
application to the gallery-core
. You can edit the file gallery-desktop.pro
yourself or use the Qt Creator wizard like this: right-click on the project and select gallery-desktop | Add library | Internal library | gallery-core | Next | Finish. Here is the updated gallery-desktop.pro
:
QT += core gui TARGET = desktop-gallery TEMPLATE = app SOURCES += main.cpp\ MainWindow.cpp HEADERS += MainWindow.h FORMS += MainWindow.ui win32:CONFIG(release, debug|release...