[Kde-perl] no addItem in Layouts?

Thomas Fjellstrom tfjellstrom at shaw.ca
Sun Jan 4 04:48:40 CET 2004


On January 3, 2004 08:17 pm, Germain Garand wrote:
> Le Samedi 03 Janvier 2004 05:09, Thomas Fjellstrom a écrit :
> > my pqtapi shows no addItem method for any of the Layouts... I want to add
> > a SpacerItem to one of my dialogs.. but addItem is the only way to add
> > LayoutItems (and derived classes) to Layouts.
> >
> > Maybe theres something I'm missing? or?
>
> Hi,
>
> mmh I'm wondering how your Smoke library was compiled?
>
> 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
> (As a side note: you can also use the autoAdd feature of Layouts, but
> please tell me more about this, it would be a very serious bug if some
> methods where somehow stripped by kalyptus under some specific
> circumstances)

Ok... I get the same result.. I thought I looked hard enough... But I still 
get errors when trying to call addItem on a HBox or VBox Layout.

I suppose maybe its not correct to use the ->layout() result from a Qt::HBox 
as the layout?

I tried:
my $spacer = Qt::SpacerItem(1, 1, &Qt::SizePolicy::Maximum, 
&Qt::SizePolicy::Maximum);
$ok_box->layout()->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?

-- 
Thomas Fjellstrom
tfjellstrom at strangesoft.net
http://strangesoft.net



More information about the Kde-perl mailing list