[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-perl
Subject:    Re: [Kde-perl] Sub form issues.
From:       Ashley Winters <jahqueel () yahoo ! com>
Date:       2005-06-02 3:14:50
Message-ID: 20050602031450.27796.qmail () web50901 ! mail ! yahoo ! com
[Download RAW message or body]

--- Roy Souther <roy@SiliconTao.com> wrote:

> Corrections to my message. I shortend the code to simplify it and did
> not look at what I was typing.

Howdy Roy.

The problem is that the code "$SubForm1 = SubForm" when at the global
scope in a module (anything like Foo.pm) is being run at *compile*
time, before the Qt::Application is constructed. That's going to fail.

If you want to store the variable inside your 'this' object as a
private variable, you could use this->{SubForm}

sub NEW {
    ...
    this->{SubForm} = SubForm;
    ...
}

sub OnWhatever {
    ...
    this->{Subform}->show;
    ...
}

My concern there would be that you're not passing a parent object to
SubForm. Normally, you construct subwindows using Widget(this) so that
when the 'this' window is closed, all its child windows (including that
Widget) get closed as well.

Qt tries to take care of closing windows for you, but if you have
reasons to do otherwise, just make sure it's taken care of.

Good luck!

Ashley Winters



		
__________________________________ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html 

_______________________________________________
Kde-perl mailing list
Kde-perl@kde.org
https://mail.kde.org/mailman/listinfo/kde-perl
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic