PDA

View Full Version : QT dialogs used in wxWidget application on MAC and Windows



hkhauke
23rd April 2010, 17:25
Hi,

I have the following question:

I have an application running in Windows and on Mac which is based on wxWidgets. In this application,
I want to add support for QT based dialogs. What I did was to write a library in which the QApplication
and my dialog widget are started in a new thread.

This works well in Windows but in Mac I get a runtime error (debug assertion failure) that application and
the dialog are not allocated in the same thread. However, I am sure that both have been allocated in the
same thread, also, it works in Windows.
In the debugger I can see that according to the call stack, I end up in a QT callback coming from a wxWidget event function which most likely causes the error. If I use the same mechansim without wxWidget (based on a command line tool), my QT library works well.

So, my guess is that the underlying Window manager (for both QT and wxWidget) does not make a difference between where the dialog comes from. Does anyone have any experience/idea or solution?

Best regards,

HK