Bug 157643 - Unexpected behavior on Plasma::BoxLayout when adding/removing items
Summary: Unexpected behavior on Plasma::BoxLayout when adding/removing items
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-11 02:26 UTC by Juan González
Modified: 2008-02-11 05:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Described test (1.95 KB, application/octet-stream)
2008-02-11 02:27 UTC, Juan González
Details
improved applet.cpp that works properly (2.77 KB, patch)
2008-02-11 05:18 UTC, Aaron J. Seigo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan González 2008-02-11 02:26:49 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc versión 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) 
OS:                Linux

I want to use Plasma::BoxLayout in my applet to show a collection of items, and when clicking on one of them I want to hide the other items and show a different item with information relative to the selected item, but it doesn't remove the items from the layout as I would expect. Maybe I didn't explain it correctly but...

As code is much better than words I've created a little test case that show the bad behavior.
I will attach it to this bug.
Comment 1 Juan González 2008-02-11 02:27:48 UTC
Created attachment 23527 [details]
Described test
Comment 2 Aaron J. Seigo 2008-02-11 05:17:17 UTC
you also need to hide/show the items.

side note:

* you don't need contentSizeHint for what you are using it for, just use setMinimumContentSize

* the set up of the GUI should really be done in init(). it's not only better for startup time, it's also likely that eventually you may want configuration values, access to the scene, etc. best to wait until init()

see attached file for a version that works well.
Comment 3 Aaron J. Seigo 2008-02-11 05:18:01 UTC
Created attachment 23530 [details]
improved applet.cpp that works properly