Note that there are some explanatory texts on larger screens.

plurals
  1. POQt GUI environment in a DLL (VST Plugin)
    primarykey
    data
    text
    <p>I would like to use the Qt GUI library as the user interface for a VST plugin. A VST plugin is a DLL on windows. A host application calls various functions on the DLL, including things like <code>openGUI()</code>.</p> <p>I want to know how to use Qt GUI from a DLL; I have done some research to look at the possible options but I'm not completely sure on the limitations.</p> <p>The main problem is where to create the <code>QApplication</code> object and call <code>exec()</code> on it (which is a function that does not return until the application has quit).</p> <p>I have looked at the solution given in <a href="https://stackoverflow.com/questions/11054087/starting-qt-gui-from-dll-in-dllstart-function">this post</a>, but after further reading it would appear this solution will not work on Mac OS X, as Cocoa is more restrictive about the particular thread a GUI can run on. It's a bit of a hack really.</p> <p>I have also seen <a href="https://stackoverflow.com/questions/1678937/dllmain-and-qt-mfc-migration">this solution</a>, but that relies on <code>QMfcApp</code> and <code>QWinWindow</code> which don't appear to be part of the Qt library any more.</p> <p>Is the only way round this for my DLL to spawn off a new application itself? Presumably I could start one with a call to <code>QProcess</code> and use some shared memory to share between the GUI application and my VST DLL? Has anyone come across this type of problem? Am I going down a bad route with this or is there something I haven't thought of yet?</p> <p><strong>Update</strong></p> <p>After further research I have come across the <a href="http://qt-project.org/doc/qt-4.8/qabstracteventdispatcher.html" rel="nofollow noreferrer"><code>QAbstractEventDispatcher</code></a> class. I have seen <a href="http://qt-project.org/doc/qt-4.8/qabstracteventdispatcher.html" rel="nofollow noreferrer">this post</a> which seems to say it's possible to call <code>QApplication::processEvents()</code> from your own (the host of my plugin) event loop instead of calling <code>QApplication::exec()</code>. Has anyone tried doing this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload