QVBoxLayout::count not returning 0 after cleaning it I have a QVBoxLayout that is cleared at runtime on some event this way: