Re: [Cppcms-users] CppCMS and QT
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-12-30 16:01:40
|
> > hi, > > i'm writing a server application which runs cppcms as the server engine, > but the cppcms applications are written using QT 4.6. This is a > requirement and can't be changed. > What are you using Qt for? > I managed to get everything working except for the thread crossing > signal/slot mechanism from qt If you want to send a signal between CppCMS application and Qt part you need to use this via either Posting events to each one's main loop or use other trick. Both CppCMS and Qt framework has their event loops. To use each even loop you need to play by their rules. If you want to have separate GUI and HTTP "GUI" you make them to cooperate by positing events, both Qt and CppCMS has such tools to do this in thread safe way. > and qt timers since they all depend on > QThreads but the cppcms applications are generated by the cppcms > application_pool and therefore are (i suppose) more booster threads than > qt threads. Threads are threads... and has nothing to do with Qt or CppCMS - all pthreads under the hood. So if you'll describe requirements in more clear way or show what is the exact problem you have I probably can help you but otherwise I don't understand what you need. > > My qeustion is: is it possible to factor the cppcms applications in a > way that they are QThreads? > CppCMS applications are not threads, they just objects that created and cached and they called from CppCMS's thread pool upon request (of course if you talking about synchronous model). Asynchonous CppCMS applications are object that interact via main event loop of CppCMS and called upon HTTP requests. > Thanks, > > Frank Artyom |