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

List:       kde-perl
Subject:    [Kde-perl] Sub form issues.
From:       Roy Souther <roy () SiliconTao ! com>
Date:       2005-06-01 21:40:26
Message-ID: 1117662026.23197.17.camel () UtopiaPlanetia
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/alternative)]


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.




[Attachment #7 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.2.2">
</HEAD>
<BODY>
New to PerlQt. Long time expert with Qt C++. So-so with Perl, and very to to Object \
Perl.<BR> <BR>
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. <BR> <BR>
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?<BR> <BR>
<BR>
package MainForm;<BR>
use Qt;<BR>
use MainFormGUI;<BR>
use Qt::isa &quot;MainFormGUI&quot;;<BR>
use SubForm;<BR>
use Qt::slots<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OnButtonPress =&gt; [];<BR>
<BR>
$SubForm1 = SubForm;<BR>
<BR>
sub NEW<BR>
{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $self = shift;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $self-&gt;SUPER::NEW(@_);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setCaption(&quot;Tester&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this-&gt;connect(pushButton1, \
SIGNAL('clicked()'), SLOT('OnInstall()'));<BR> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pushButton1-&gt;setFocus();<BR> }<BR>
<BR>
sub OnButtonPress<BR>
{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;OnButtonPress\n&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hide();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(radioButton1-&gt;isChecked() == 1)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
$SubForm1-&gt;show();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
}<BR>
<BR>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<U><A HREF="mailto:roy@SiliconTao.com">Roy Souther</A></U><BR>
<U><A HREF="http://www.SiliconTao.com">www.SiliconTao.com</A></U><BR>
Let Open Source help your business move beyond.<BR>
<BR>
For security this message is digitally authenticated by <U><A \
HREF="http://www.gnupg.org">GnuPG</A></U>. </TD>
</TR>
</TABLE>
<BR>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>


["signature.asc" (application/pgp-signature)]

_______________________________________________
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