[Interest] qtbrowserplugin

"Alexander CarĂ´t" alexander_carot at gmx.net
Wed Sep 5 14:18:21 CEST 2012

Hej Oliver,

thanks for the detailed answer ! However, in the meantime I solved the framework problem on OSX already myself with install_name_tool: In fact I have two Qt versions on my machine (the trivial plugin is built with 4.7 and the example app I posted is built with 4.8) but the actual plugin problem was that it couldn't find the 4.7 libs, which I solved by copying QtCore and QtGui into the plugin-bundle and applying install_name_tool. 

> Note that for Application Bundles there exists a utility tool called
> 'qtmacdeploy' which does exactly the above steps: however in its
> latest incarnation in Qt 4.8 it basically copies pretty much all Qt
> libraries (also the ones your applicaiton doesn't really need) into
> your Application Bundle (in theory qtmacdeploy should be smart enough
> to figure out which Qt Frameworks and Plugins your application really
> needs, e.g. by analysing the QT and CONFIG variables in your *.pro
> file - in practise you can delete the unecessary Qt plugins in a
> post-processing script).

Yepp -- I love this tool and regularly use it ! In fact this doesn't work for the plugin problem, which is why I manually did it via install_name_tool.

> Just for testing: rename ALL your Qt installation folders, make sure
> that they don't appear in the PATH etc. and only leave the expected Qt
> version at a place where it can be found by your plugin (I don't know
> where that would be - somewhere in the PATH? In the same location as
> the plugin? In a "shared folder" where the browser looks for DLLs?
> Again refer to above documentation).

Allright -- this is what I am doing and so far it looks fine on Mac and Win as well.

> Double-check that the Qt plugins (image plugins, for instance) can be
> found as well by your browser plugin!

This is also the case. In fact the trivial example is very basic (as the name says ;-) - so, it essentially helps to figure if the plugin installation process works or not. It seems to require QtCore and QtGui only and these are in the bundle already. In the meantime I was able to actually load the plugin but the next problem appears that actually noting is displayed (posted this a couple of minutes ago).

> But thinking about it again for a second: wouldn't it make sense to
> link your browser plugin statically anyway? I mean, how would you want
> to distribute it anyway? With its own installer?

Yes, this is totally right but at the moment I simply want to figure the possibilities of running a Qt app within the browser and becoming familiar with the process itself. This is why I currently want to keep the actual configuration. 

> Also in general "dependency walker" is a /very/ helpful tool on
> Windows to track down DLL dependency issues (google for it: it is a
> free tool and also comes with the Windows SDK/Visual Studio).

Thanks for that hint !



> Cheers, Oliver
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797

More information about the Interest mailing list