Re: PerlQT Canvas Sample?

Gerhard Stenzel <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
>Small? How about a one-liner?
Thanks Ashley. Exactly what I was looking for. For the convenience 
of other beginnners, I added some newlines to make it easier to read:

#!/usr/bin/perl
use Qt;
$a=Qt::Application(\@ARGV); 
$c = Qt::Canvas 1000,1000; 
$t = Qt::CanvasText "Howdy", $c; 
show $t; 
$cv = Qt::CanvasView $c;
setMainWidget $a $cv; 
show $cv; 
$a->exec

This works, also for me. Now if I try to do the same thing in
pqt-designer, it does not work ... I see a mainwindow, a canvasview with scrollbars, but no text.
Obviously, I am making a rather trivial mistake, but fail to spot it. 
I include the init() from pqt-designer:

sub init
{
    my $c = Qt::Canvas(1000,1000);
    my $t = Qt::CanvasText("Howdy", $c);
    $t->show();
    my $cv = Qt::CanvasView($c, this);
    $cv->setGeometry( Qt::Rect(10, 10, 200,200) );
    $cv->show();
}

Any ideas?

Gerhard
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.