Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2008
Auto event object receiver selection


Message 1 in thread

Hi everybody,
 
Is there the posibility that an application through the user, defines the receiver of an event.
 
I mean I have a list containing objects that are bits from a HW, and the user can select one to turn on other bits in the same HW.
 
The user is selecting both, which bit wants to turn on and which bit is going to generate the event to turn on the first.
 
I'm using a thread to read the state of the bit, and to post event seems that QThread::postEvent(receiver,event) is the function that I need, but I don't know how the user can define the receiver and not the programmer inside the code.
 
Any idea?
 
I will be glad with your suggestions.
 
best regads
 
David R.
_________________________________________________________________
MSN Noticias
http://noticias.msn.es/comunidad.aspx

Message 2 in thread

 Hi,
 
I have a big doubt and I don't know if I'm naive, is it possible that an application auto defines an slot or an event receiver? I mean always I have to define the slot with slots like:
 
connect(sender,SIGNAL(),receiver,SLOT())
or QThread::post(receiver, event)
 
my doubt is if theres a way to make an auto definition of the receiver? so when the user selects an object from a list, this object becomes the receiver in that functions.
 
thanks
 
David R.


From: d_rdgz@xxxxxxxxxxxxx: qt-interest@xxxxxxxxxxxxxxxxxxxx: Auto event object receiver selectionDate: Tue, 11 Mar 2008 19:34:23 +0100


Hi everybody, Is there the posibility that an application through the user, defines the receiver of an event. I mean I have a list containing objects that are bits from a HW, and the user can select one to turn on other bits in the same HW. The user is selecting both, which bit wants to turn on and which bit is going to generate the event to turn on the first. I'm using a thread to read the state of the bit, and to post event seems that QThread::postEvent(receiver,event) is the function that I need, but I don't know how the user can define the receiver and not the programmer inside the code. Any idea? I will be glad with your suggestions. best regads David R.

Tecnología, moda, motor, viajes,.suscríbete a nuestros boletines para estar siempre a la última MSN Newsletters 
_________________________________________________________________
La vida de los famosos al desnudo en MSN Entretenimiento
http://entretenimiento.es.msn.com/

Message 3 in thread

Not sure if i understood you correctly. Maybe you're looking for this: QMetaObject::connectSlotsByName
http://doc.trolltech.com/4.3/designer-using-a-component.html#widgets-and-dialogs-with-auto-connect 

Cheers,
Peter

> -----Ursprüngliche Nachricht-----
> Von: David Rodríguez [mailto:d_rdgz@xxxxxxxxxxx] 
> Gesendet: Mittwoch, 12. März 2008 09:02
> An: qt-interest@xxxxxxxxxxxxx
> Betreff: FW: Auto event object receiver selection
> 
>  Hi,
>  
> I have a big doubt and I don't know if I'm naive, is it 
> possible that an application auto defines an slot or an event 
> receiver? I mean always I have to define the slot with slots like:
>  
> connect(sender,SIGNAL(),receiver,SLOT())
> or QThread::post(receiver, event)
>  
> my doubt is if theres a way to make an auto definition of the 
> receiver? so when the user selects an object from a list, 
> this object becomes the receiver in that functions.
>  
> thanks
>  
> David R.
> 
> 
> 
> 
> ________________________________
> 
> 	From: d_rdgz@xxxxxxxxxxx
> 	To: qt-interest@xxxxxxxxxxxxx
> 	Subject: Auto event object receiver selection
> 	Date: Tue, 11 Mar 2008 19:34:23 +0100
> 	
> 	
> 	Hi everybody,
> 	 
> 	Is there the posibility that an application through the 
> user, defines the receiver of an event.
> 	 
> 	I mean I have a list containing objects that are bits 
> from a HW, and the user can select one to turn on other bits 
> in the same HW.
> 	 
> 	The user is selecting both, which bit wants to turn on 
> and which bit is going to generate the event to turn on the first.
> 	 
> 	I'm using a thread to read the state of the bit, and to 
> post event seems that QThread::postEvent(receiver,event) is 
> the function that I need, but I don't know how the user can 
> define the receiver and not the programmer inside the code.
> 	 
> 	Any idea?
> 	 
> 	I will be glad with your suggestions.
> 	 
> 	best regads
> 	 
> 	David R.
> 	
> 	
> ________________________________
> 
> 	Tecnología, moda, motor, viajes,.suscríbete a nuestros 
> boletines para estar siempre a la última MSN Newsletters 
> <http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P
=WCMaintenance&Brand=WL&RU=http://mail.live.com>  
> 
> 
> ________________________________
> 
> Sigue los principales acontecimientos deportivos en directo. 
> MSN Motor <http://video.msn.com/video.aspx?mkt=es-es> 
> 

--
 [ signature omitted ]