[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-perl
Subject: Re: [Kde-perl] Sub form issues.
From: Roy Souther <roy () SiliconTao ! com>
Date: 2005-06-01 21:48:43
Message-ID: 1117662523.23197.22.camel () UtopiaPlanetia
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/alternative)]
Corrections to my message. I shortend the code to simplify it and did
not look at what I was typing.
1) very new to Object Perl.
2) this->connect(pushButton1, SIGNAL('clicked()'),
SLOT('OnButtonPress()'));
On Wed, 2005-06-01 at 15:40 -0600, Roy Souther wrote:
> 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
> Kde-perl@kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl
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>
Corrections to my message. I shortend the code to simplify it and did not look at \
what I was typing.<BR> <BR>
1) <FONT COLOR="#000000">very n</FONT>ew<FONT COLOR="#000000"> to Object \
Perl.</FONT><BR> <BR>
2) <FONT COLOR="#000000">this->connect(pushButton1, SIGNAL('clicked()'), \
SLOT('OnButtonPress()'));</FONT><BR> <BR>
On Wed, 2005-06-01 at 15:40 -0600, Roy Souther wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT COLOR="#000000">New to PerlQt. Long time expert with Qt C++. So-so with \
Perl, and very to to Object Perl.</FONT><BR> <BR>
<FONT COLOR="#000000">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. </FONT><BR> \
<BR> <FONT COLOR="#000000">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?</FONT><BR> <BR>
<BR>
<FONT COLOR="#000000">package MainForm;</FONT><BR>
<FONT COLOR="#000000">use Qt;</FONT><BR>
<FONT COLOR="#000000">use MainFormGUI;</FONT><BR>
<FONT COLOR="#000000">use Qt::isa "MainFormGUI";</FONT><BR>
<FONT COLOR="#000000">use SubForm;</FONT><BR>
<FONT COLOR="#000000">use Qt::slots</FONT><BR>
<FONT COLOR="#000000"> OnButtonPress \
=> [];</FONT><BR> <BR>
<FONT COLOR="#000000">$SubForm1 = SubForm;</FONT><BR>
<BR>
<FONT COLOR="#000000">sub NEW</FONT><BR>
<FONT COLOR="#000000">{</FONT><BR>
<FONT COLOR="#000000"> my $self = \
shift;</FONT><BR> <FONT COLOR="#000000"> \
$self->SUPER::NEW(@_);</FONT><BR> <FONT \
COLOR="#000000"> \
setCaption("Tester");</FONT><BR> <FONT \
COLOR="#000000"> \
this->connect(pushButton1, SIGNAL('clicked()'), SLOT('OnInstall()'));</FONT><BR> \
<FONT COLOR="#000000"> \
pushButton1->setFocus();</FONT><BR> <FONT COLOR="#000000">}</FONT><BR>
<BR>
<FONT COLOR="#000000">sub OnButtonPress</FONT><BR>
<FONT COLOR="#000000">{</FONT><BR>
<FONT COLOR="#000000"> print \
"OnButtonPress\n";</FONT><BR> <FONT \
COLOR="#000000"> hide();</FONT><BR> <FONT \
COLOR="#000000"> \
if(radioButton1->isChecked() == 1)</FONT><BR> <FONT \
COLOR="#000000"> {</FONT><BR> <FONT \
COLOR="#000000"> \
$SubForm1->show();</FONT><BR> <FONT \
COLOR="#000000"> }</FONT><BR> <FONT \
COLOR="#000000">}</FONT><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>
<BR>
</TD>
</TR>
</TABLE>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Kde-perl mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Kde-perl@kde.org">Kde-perl@kde.org</A></FONT>
<FONT COLOR="#000000"><A \
HREF="https://mail.kde.org/mailman/listinfo/kde-perl">https://mail.kde.org/mailman/listinfo/kde-perl</A></FONT>
</PRE>
</BLOCKQUOTE>
<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