[Kde-perl] no addItem in Layouts?
Ashley Winters
jahqueel at yahoo.com
Sun Jan 4 05:29:09 CET 2004
--- Thomas Fjellstrom <tfjellstrom at shaw.ca> wrote:
> On January 3, 2004 08:17 pm, Germain Garand wrote:
> > Here I got:
> > pqtapi -r addItem
> > void QBoxLayout::addItem(QLayoutItem*)
> > void QCanvas::addItem(QCanvasItem*)
> > void QCanvas::addItemToChunk(QCanvasItem*, int, int)
> > void QCanvas::addItemToChunkContaining(QCanvasItem*, int,
> int)
> > void QDockAreaLayout::addItem(QLayoutItem*)
> > void QGridLayout::addItem(QLayoutItem*)
> > void QGridLayout::addItem(QLayoutItem*, int, int)
> >
> > Germain
> I suppose maybe its not correct to use the ->layout() result from a
> Qt::HBox
> as the layout?
Bingo.
> I tried:
> my $spacer = Qt::SpacerItem(1, 1, &Qt::SizePolicy::Maximum,
> &Qt::SizePolicy::Maximum);
> $ok_box->layout()->addItem($spacer);
$ok_box->addItem($spacer);
> I also have another question.. is it possible to access the
> attributes of your
> own subclasses, from outside those objects, besides through making
> your own
> accessor methods?
If you want to break encapsulation, go for it; it's one of the joys of
Perl. The attributes aren't hidden: $your_object->{foo} accesses the
'foo' attribute declared in $your_object's class.
Ashley Winters
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
More information about the Kde-perl
mailing list