Sub form issues.

Roy Souther <[email protected]> Wed, 01 Jun 2005 15:40:26 -0600
Newsgroups gmane.comp.kde.devel.perl
Organization Silicon Tao Technology Systems Inc.
Message-ID <1117662026.23197.17.camel@UtopiaPlanetia>
New to PerlQt. Long time expert with Qt C++. So-so with Perl, and very
to to Object Perl.

I am trying to make a form pop up when a button is clicked. I have tried
dozens of combinations but cannot get this to work. I get different
errors that I think are caused by the variable for the sub form object. 

Where can I put the $SubForm1 variable? Does Object Perl have any way to
define a member variable that is global only to the parent object?


package MainForm;
use Qt;
use MainFormGUI;
use Qt::isa "MainFormGUI";
use SubForm;
use Qt::slots
        OnButtonPress => [];

$SubForm1 = SubForm;

sub NEW
{
        my $self = shift;
        $self->SUPER::NEW(@_);
        setCaption("Tester");
        this->connect(pushButton1, SIGNAL('clicked()'),
SLOT('OnInstall()'));
        pushButton1->setFocus();
}

sub OnButtonPress
{
        print "OnButtonPress\n";
        hide();
        if(radioButton1->isChecked() == 1)
        {
               $SubForm1->show();
        }
}




Roy Souther
www.SiliconTao.com
Let Open Source help your business move beyond.

For security this message is digitally authenticated by GnuPG.

_______________________________________________
Kde-perl mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-perl
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBCnitKY62fql08qicRAk/eAJ9k12fzEzESmrAWrUBB4IYaA8AyVACfeipc
1ID1yF99jSWHIZsmG8zn8VU=
=N9Kc
-----END PGP SIGNATURE-----