[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Deleting and reimplementing a layout
From:       Thomas =?iso-8859-1?q?L=FCbking?= <thomas.luebking () web ! de>
Date:       2009-09-25 18:00:18
Message-ID: 200909252000.19043.thomas.luebking () web ! de
[Download RAW message or body]

The layout items (widgets) are (usually) parented by the layouted widget 
("bottom")
If you want to get rid of them, you'll have to delete them:
bottom->lyout()->itemAt(i)
or (in case you want them in the new layout)
while (bottom->layout()->count())
bLayout->addItem(bottom->layout()->takeAt(0))

before deleting bottom->layout()

Thomas

Am Friday 25 September 2009 schrieb David Hubner:
> Hi,
> 
> I am trying to delete a widgets layout, creating a new layout in its stead.
>  When i do something like
> 
>   delete bottom->layout();
> 
>   bLayout->insertSpacing(0,20);
>   bLayout->setAlignment(Qt::AlignTop);
> 
>   bottom->setLayout(bLayout);
> 
> It works, but adds the layout above the old layout, not cleaning the old
>  layout. This adds a new graphical feature to my application but its not
>  what i need :) Is there a correct way to delete a layout and setting
>  another layout in its stead?
> 
> Thanks
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
> 

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic