PDA

View Full Version : Create plugin in Visual Studio



estel
6th March 2010, 13:41
Hello,
I want to make some plugin to Qt application(not QtDesigner), in documentation there is some tutorial(Extending Qt Applications) and the is shown that in *.pro file must be set


TEMPLATE = lib
CONFIG += plugin

In Visual studio there is "Qt lirary project" but there isn't something like "Qt plugin project". Meybe You know how to create qt plugin in Visual Studio? I have VS2008professional.

Lesiok
6th March 2010, 17:31
Create manually PRO file and then create VCPROJ file with command
qmake -tp vc yours_pro_file.pro

estel
9th March 2010, 23:40
Unfortunately it does not work. When I run code of plugin I get file: "name.dll.intermediate.manifest" and when I run the main program I have


QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName) );
QObject *plugin = pluginLoader.instance();

and for the file "name.dll.intermediate.manifest" variable plugin is null. I run the same code in QtCreator and it work fine, unfortunately I have to use VisualStudio.

Edit:
I made 2 projects in one solution and appripriately *.dll was create in catalog that is common for this 2 projects.