Hello,

Have you tried to use the wtwithqt library in examples/wtwithqt ?

Alternatively, you may want to try this:

http://web.archive.org/web/20070703100120/http://scottcollins.net/articles/a-deeper-look-at-signals-and-slots.html

(Wt signals and slots are based on Boost's)

On Fri, Nov 26, 2010 at 12:18 PM, Tristan Bonsall
<[email protected]> wrote:
> I am working on an embedded Qt-based application, using Wt to present a
> web-based interface.
>
> I would like to be able to connect signals emitted from objects created in
> the Qt application to slots of objects created in my Wt application. For
> example, when something changes in the state of my application, it emits a
> signal and the part of the web application that is reflecting that state is
> updated accordingly.
>
> When my Qt signal is emitted, it is posting a QMetaCallEvent to the object
> in the Wt application, because it knows that they are in different threads,
> but I am not seeing that event arrive at the other end.
>
> By reimplementing QApplication::notify() and tracing all events received in
> all threads, I do not see an event with type QEvent::MetaCall at all. If I
> step into QApplication::postEvent, it thinks the thread of the receiver
> hasn't got an event dispatcher, so I think the event is left sitting in the
> post queue.
>
> I have attached a simple example, based on the code from the wtwithqt
> example, and it is not behaving as I need. It creates an object in the main
> thread that emits a signal when a button is clicked. I have then connected
> this to a slot in my WApplication that should increment a counter every time
> the button is pressed and refresh a Wt::WLabel with the count. However, the
> somethingWasDone() slot is never called.
>
> Am I doing something obviously wrong?
>
> Tristan
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>



-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to