Re: I've a interesting issue with PerlQt 3.008

Richard Dale <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Organization Lost HIghway
Message-ID <[email protected]>
On Tuesday 17 August 2004 01:36, Gary Greene wrote:
>
> The script follows:
> #!/usr/bin/perl
> use Qt 2.0;
> use Qt::app;
>
> $mylabel = new Qt::Label( "Hello world", 0 );
> $mylabel->resize( 120, 30 );
>
> $app->setMainWidget( $mylabel );
> $mylabel->show();
>
> exit $app->exec();
>
> Is the "use Qt 2.0;" line the culprit? I'll admit that I'm using Qt 3.3.3
> with the bindings.
Umm.. yes indeed
> Any help is appreciated. Thanks.
Please compare and contrast your code with this 'Hello World' tutorial 
PerlQt/tutorials/t1 in PerlQt 3.008:

#!/usr/bin/perl -w
use strict;
use blib;
use Qt;

my $a = Qt::Application(\@ARGV);

my $hello = Qt::PushButton("Hello World!", undef);
$hello->resize(100, 30);

$a->setMainWidget($hello);
$hello->show;
exit $a->exec;

I assume you've copied a code snippet from the obsolete PerlQt 2.x bindings, 
otherwise where does the 'use Qt 2.0' come from?

-- Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.