On segunda-feira, 2 de abril de 2012 18.05.17, Riccardo Roasio wrote: > Hi, > > how can i post an event from a thread to another? > > my application have a thread that read from a serial port and another > thread that wait for something received on the serial port. > > I cannot use postEvent because in one thread i don'e have reference to > the other... > > How can i do that?
You don't post events to threads. You post events to objects only. The events are delivered in each object's associated thread. So, use: QCoreApplication::postEvent(myObject, new MyEvent); -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest