Loading your plugins dynamically

We will now deal with the application loading these plugins:

  1. Create a new Subproject inside ch08-image-animation.
  2. Select the type Qt Widgets Application.
  3. Name it image-animation and accept the default Class Information settings.

We have a few last things to do in the .pro files. First, image-animation will try to load the plugins from somewhere in its output directory. Because each filter plugin project is independent, its output directory is separated from image-animation. Thus, each time you modify a plugin, you will have to copy yourself the compiled shared library inside the proper image-animation directory. This works to make it available to the image-animation application, but we are lazy developers, ...

Get End to End GUI Development with Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.