Difference between revisions of "Qt - easy plugin system example"

From Kenneth Noyens
Jump to: navigation, search
(Nieuwe pagina aangemaakt met 'Main application (loads the plugins): - plugintest.pro - main.cpp - pluginInterface - plugins.cpp - plugins.h - plugins.ui Make a folder...')
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
  - [[plugintest.pro]]
 
  - [[plugintest.pro]]
 
  - [[main.cpp]]
 
  - [[main.cpp]]
  - [[pluginInterface]]
+
  - [[pluginInterface.h]]
 
  - [[plugins.cpp]]
 
  - [[plugins.cpp]]
 
  - [[plugins.h]]
 
  - [[plugins.h]]
 
  - [[plugins.ui]]
 
  - [[plugins.ui]]
  
Make a folder in the main application (ex. Text1Plugin) and add the folowing files:
+
Make a folder in the above directory (ex. Text1Plugin) and add the following files: (for sharing pluginInterface.h)
 
  - [[text1plugin.pro]]
 
  - [[text1plugin.pro]]
 
  - [[text1plugin.cpp]]
 
  - [[text1plugin.cpp]]
Line 14: Line 14:
 
Watch out:<br>
 
Watch out:<br>
 
  - When you compile your project, you must compile both projects as the same build configuration.(both debug or release)
 
  - When you compile your project, you must compile both projects as the same build configuration.(both debug or release)
  - When you build text1plugin put the compiled dll in a folder named 'plugins' in the appication directory.
+
  - When you build text1plugin put the compiled dll in a folder named 'plugins' in the main application directory.

Latest revision as of 15:48, 24 May 2009

Main application (loads the plugins):

- plugintest.pro
- main.cpp
- pluginInterface.h
- plugins.cpp
- plugins.h
- plugins.ui

Make a folder in the above directory (ex. Text1Plugin) and add the following files: (for sharing pluginInterface.h)

- text1plugin.pro
- text1plugin.cpp
- text1plugin.h

Watch out:

- When you compile your project, you must compile both projects as the same build configuration.(both debug or release)
- When you build text1plugin put the compiled dll in a folder named 'plugins' in the main application directory.