Re: [K3d-development] Using k3d from an application
Brought to you by:
barche
From: Timothy M. S. <ts...@k-...> - 2003-03-28 01:46:15
|
Fred Labrosse wrote: > Timothy M. Shead writes: > > > > If you're looking for more fine-grained control, you can embed K-3D in > > your application - look in the k3d/application directory, where you will > > see that the K-3D application is simply an executable "wrapper" around > > libk3dsdk. At this point, linking with libk3dsdk is pulling in the GTK+ > > user interface, which we are working (long term) to separate, but you > > can still hide it (or not) according to your needs. > > > > This is exactly what I need to do. I can see one problems however. I > normally use QT and not gtk+, which means that if I want to allow any kind > of user interaction with the k3d part, I'll have to start the event loop, > preventing me to start the QT event loop. Could this be solved by having > them in 2 different threads? I've often wondered if this type of interaction (an app using both toolkits) was possible. I *will* guarantee that multithreading is not the answer ... the trick in your case would be to run the GTK+ event loop periodically, say from an idle-handler in the main Qt event loop. You should be able to do this by calling sdpGtkHandlePendingEvents(). I'll be really interested to hear how FrankenK3D works ... Tim |