[Kde-perl] Sub form issues.

Roy Souther roy at SiliconTao.com
Wed Jun 1 23:40:26 CEST 2005


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.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-perl/attachments/20050601/9108b0f0/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20050601/9108b0f0/attachment.pgp


More information about the Kde-perl mailing list