[Qt-interest] Modal dialogs and their variable still exists afterthe EXEC?

Scott Aron Bloom Scott.Bloom at sabgroup.com
Tue Apr 7 16:20:58 CEST 2009


What does the debugger tell you... 

 

Did you put a breakpoint in CPoinRegDlg ::~CPoinRegDlg ?

 

Did it get called?

 

I doubt getSourceList is returning null.. it may be returning an empty
list, but not null


Scott

 

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Giancarlo Amati
Sent: Tuesday, April 07, 2009 12:42 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Modal dialogs and their variable still exists
afterthe EXEC?

 

Hello everybody,

I have this code:

CPointRegDlg *ptrDlg = new CPointRegDlg();
    ptrDlg->setModal(true);
    int accept = ptrDlg->exec();
    PointList l1 =  ptrDlg->getSourceList();


where ptrDlg is my dialog window derived from a QDialog and I call the
exec() function as I want a Modal execution. Now, I wonder if after
having called the function I still have the access to its members
variable, one of them accessed by getSourceList() (I created this
function) or the memory is deallocated after the execution.
The problem I have is that l1 is always NULL and it shouldn't.


Kind Regards.
Giancarlo

________________________________

Il remix esclusivo di Messenger. Scaricalo gratis!
<http://clk.atdmt.com/GBL/go/140630362/direct/01/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090407/96b4761d/attachment.html 


More information about the Qt-interest-old mailing list