[Qt-interest] signal emitted eveytime the dialog closes, in QT internally

Sahana Bhaskar Sahana_Bhaskar at infosys.com
Tue Jun 28 16:16:41 CEST 2011


great ..that worked yay!! Thanks alex..


do you have an idea on the question below:



I have a very basic question. When a URL is added(or removed)  from  the sidebar  in a dialog can we capture this event?


The dialog below has drag & drop capability where the user can drag a file/folder from the left pane shown below to the right pane which is a sidebar. Now I want to raise a signal every time the sidebar is updated due to addition or removal. Is it possible?



Ps: these are my windows:
[cid:image001.png at 01CC35CC.1A6C2FC0]

Thanks,
sahana

From: qt-interest-bounces+sahana_bhaskar=infosys.com at qt.nokia.com [mailto:qt-interest-bounces+sahana_bhaskar=infosys.com at qt.nokia.com] On Behalf Of Alexandre Beraud
Sent: Tuesday, June 28, 2011 7:19 PM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] signal emitted eveytime the dialog closes, in QT internally

Wait, maybe I misunderstood you but did you connect the finished(int) signal to your finished(int) slot ? The finished(int) signal, even if emited automaticaly by the QDialog class, needs to be connected to some slot, in your case, the finished(int) method that is NOT the same thing as the finished(int) signal.
I would give the slot function another name, like handleFinished(int) and add (for example in the constructor):
connect(this, SIGNAL(finished(int)), this, SLOT(handleFinished(int)));

Regards,

Alex


Le 28/06/2011 15:35, Sahana Bhaskar a écrit :

In the examples shown below I just added the below two functions to the same class. Now the control flows to changeevent on every event but not to finished on close. Why?

All I have done is written this slot and defined in header. Nothing else.

void FileDialog::changeEvent ( QEvent * event )
{
...
}

void FileDialog::finished ( int result )
{
...
}




--

Alexandre BERAUD

Ingénieur Développement - INFFLUX

01 49 57 92 00

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110628/dfa6645f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 14879 bytes
Desc: image001.png
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110628/dfa6645f/attachment.png 


More information about the Qt-interest-old mailing list