<!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>