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

Qt-interest Archive, October 2007
Signal order


Message 1 in thread

I have a form with a QLineEdit and A QPushButton with the signal:

connect(pushButtonOk,SIGNAL(clicked()),this, SLOT(Move()));
connect(lineEditXInit,	SIGNAL(editingFinished()), this,SLOT(Update()));

When I click the button the form must be closed without call Update. The 
problem is that first it call the slot connected to editingFinished then 
the slot connected to clicked. Can I avoid this?

Thanks
Teo

--
 [ signature omitted ] 

Message 2 in thread

On 10.10.07 16:19:15, matteo wrote:
> I have a form with a QLineEdit and A QPushButton with the signal:
> 
> connect(pushButtonOk,SIGNAL(clicked()),this, SLOT(Move()));
> connect(lineEditXInit,	SIGNAL(editingFinished()), this,SLOT(Update()));
> 
> When I click the button the form must be closed without call Update. The 
> problem is that first it call the slot connected to editingFinished then the 
> slot connected to clicked. Can I avoid this?

No, but maybe you've got the wrong signal? editingFinished is emitted
whenever you're done typing text into the lineedit, i.e. also if it
looses focus (== clicking a button). So I guess you want some other
signal from the lineedit to connect to your update slot.

Also worth mentioning: The order in which slots are called is not
determined either, that is slots connected to the same signal.

Andreas

-- 
 [ signature omitted ]