QScrollArea and QVBoxLayout issues with dynamically added widgets
Im running into a weird issue with dynamically added widgets to a QVBoxLayout contained inside a QScrollArea. If I add the widgets it works as expected, however after all widgets are removed, there are still some left overs on the screen. Is this a bug? Can someone else reproduce it?
"Here is a small project to reproduce it":https://github.com/dryajov/testscrollarea.git
is not enough to also remove the widgets.
You should do this:
while ((child = layout->takeAt(0)) != 0)
That seems to have done it. The important bit seems to be:
Because I did try deleting just the LayoutItem in my work project.