Bug 187820 - KWidgetItemDelegate does not delete subitems in a treeview properly
Summary: KWidgetItemDelegate does not delete subitems in a treeview properly
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: 4.2
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 182753 235126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-21 22:46 UTC by Stefan Majewsky
Modified: 2023-01-11 05:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Initial state of my treeview (24.40 KB, image/png)
2009-03-21 22:48 UTC, Stefan Majewsky
Details
State of treeview after deleting the root item (16.09 KB, image/png)
2009-03-21 22:51 UTC, Stefan Majewsky
Details
State of treeview after adding another root item and sub item (24.78 KB, image/png)
2009-03-21 22:53 UTC, Stefan Majewsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Majewsky 2009-03-21 22:46:32 UTC
Version:            (using KDE 4.2.1)
Installed from:    SuSE RPMs

KWidgetItemDelegate has several issues with treeviews. In my application KaNDAS, I'm currently working around most of these by keeping all items expanded at all time and disallowing user interaction with myTreeView->setItemsExpandable(false).

One problem still persists: If an expanded item is deleted from the treeview, the widgets of any subitems are still visible, eventually overlapping other widgets from subitems that moved into that position.

I'll be providing screenshots in the next comments. It would be nice if you could provide me with a workaround, as this is a release blocker for the next major version of my application.
Comment 1 Stefan Majewsky 2009-03-21 22:48:59 UTC
Created attachment 32327 [details]
Initial state of my treeview

This is how my treeview looks like when I start the application.
Comment 2 Stefan Majewsky 2009-03-21 22:51:54 UTC
Created attachment 32328 [details]
State of treeview after deleting the root item

Now I sent a signal to delete the root item. Note that the widgets for the subitem are still there. (Yes, the whole item content is a big QGridLayout, the code is cleaner this way.)
Comment 3 Stefan Majewsky 2009-03-21 22:53:38 UTC
Created attachment 32329 [details]
State of treeview after adding another root item and sub item

Now I sent some signal to add a similar data structure to the tree view again. Note that the widgets of the old sub item are still there and overlapping the new sub item.
Comment 4 Stefan Majewsky 2009-03-22 00:34:55 UTC
I found that the following (quite obvious) workaround works: When one deletes an item from the model, one should previously delete all sub items (recursively) to make sure that the KWidgetItemDelegate destroys all widgets.
Comment 5 Christoph Feck 2009-12-09 07:05:38 UTC
*** Bug 188501 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2009-12-09 07:06:45 UTC
Bug 188501 also has a video showing the problem.
Comment 7 Christoph Feck 2009-12-09 07:07:29 UTC
*** Bug 182753 has been marked as a duplicate of this bug. ***
Comment 8 Marcel Wiesweg 2010-01-03 17:37:27 UTC
*** Bug 219876 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2010-04-23 01:02:34 UTC
*** Bug 235126 has been marked as a duplicate of this bug. ***
Comment 10 Andrew Crouthamel 2018-11-02 22:58:22 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Andrew Crouthamel 2018-11-16 05:30:16 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 12 Justin Zobel 2022-12-12 01:56:14 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 13 Bug Janitor Service 2022-12-27 05:20:30 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2023-01-11 05:18:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!