[Interest] Running Qt in a shared library on a Mac

Eric Feigenson eric at feigenson.net
Thu Jan 23 03:15:26 CET 2014


Hello list... I'm new here, so be gentle ;)

I have a question that was posted to the Qt forums here:  http://qt-project.org/forums/viewthread/37413/

I learned some things there, but was also directed here for more wisdom.

Here's as brief a summary as I can muster... see the posting for details:

This is all on a Mac, which is where the complications come in.
From "main" I want to invoke some function(s) in a shared library that do Qt things.  But I'd like the functions to return while the Qt things are going on, in order for main to do some other things.  I know that on the Mac, all GUI things need to happen in the main thread, so that the QApplication would have to run in the main thread.  But if I do a QApplication.exec() on the main thread, then the main thread will block until all the Qt goodness has completed.

Right now I'm using a dylib, but a static link would be just as good if it would help.

The forum posting shows some attempts at using QThreads to solve the problem, but at the moment they don't, and I'm at a loss.

Can anyone advise/help/assist?

Thanks!

-Eric


More information about the Interest mailing list