[Kde-perl] slider not appearing

Jake Hawkes jake at infinitylimited.net
Sat Mar 13 08:50:42 CET 2004


On March 13, 2004 00:18, Ashley Winters wrote:
> --- Jake Hawkes <jake at infinitylimited.net> wrote:
> > ok - this has got me stumped.
> >
> > 	my $volbox = Qt::HBox($parent);
>
> You sure you didn't want Qt::VBox?

yep :)

>
> perl -MQt -e '$a = Qt::Application \@ARGV; $b = Qt::VBox; $l =
> Qt::Label "Howdy", $b; $s = Qt::Slider &Qt::Horizontal, $b;
> setMainWidget $a $b; show $b; $a->exec'

ok - the problem is somehow related to my packaging code.

I used to have
package FOO;
sub NEW {
	my $slider = ....
}
package main;
use FOO;
my $a = Qt::Application....
my $w = Foo;

but if I moved things around to be:
package FOO;
my slider;
sub NEW {
	$slider = Qt:....
}
it works.

>
> Ashley Winters
>
> > 	my $volVal = Qt::Label(vol, $volbox);
> > 	my $slider = Qt::Slider(&Qt::Horizontal, $volbox);
> >
> > 	$slider->setRange(0,10);
> > 	$slider->setValue(0);
> >
> >
> > the label appears, but the slider does not.....
> >
> > I went and copied tutorial 5 and *it* doesn't work either.....
> > _______________________________________________
> > Kde-perl mailing list
> > Kde-perl at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-perl
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
> _______________________________________________
> Kde-perl mailing list
> Kde-perl at kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl


More information about the Kde-perl mailing list