Hi Gunnar,
 
thanks for your reply.
Right now, I'm a little confused. I know this might be due to a lack of my 
knowledge on Java in general.
To me the concept of QObject trees makes perfect sense for C++ as a means for 
convenient memory management. But I can't see the benefit for a Java 
environment where we have the Garbage Collection.
In other words:

*       
        Does a QWidget child/parent relationship serve any purpose other than 
memory management?
*       
        In Qt Jambi, do I have to specify parents for my widgets at all? If 
yes, in what cases do I have to do that?
*       
        Will I have memory leaks if I don't explicitly built such a hierarchy?

kind regards, Curt



________________________________

Von: Gunnar Sletta [mailto:[EMAIL PROTECTED]
Gesendet: Mi 17.09.2008 10:08
An: Curt Nowak
Cc: [email protected]
Betreff: Re: [Qt-jambi-interest] Bad widget/layout hierarchy causes JVM crash



Curt Nowak wrote:
> Hello again,
> 
> this post is related to my previous post. As I tried to setup a 
> parent-hierarchy among my widgets at one point the JVM crashed. I was able to 
> reproduce and to narrow the problem. Below is my short example program. Even 
> though I do admit that it makes little sense to make a widget parent of two 
> different layouts I didn't come across a good explanation for the crash of 
> the program.
> Is this a known issue? Does anyone know more about this?
> 
> Cheers, Curt

Hi Curt,

The problem is that setting the parent explicitly on the layout is not
equivalent of constructing the layout with a parent. Setting the parent
explicitly is the cause of the crash and is not supported. I've filed a
bug with the layout guys to nicen this up so such an obvious use case
doesn't crash.

best regards,
Curt



_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to