solved thanks Lykurg for helping

here is the code that solvs

Qt Code:
  1. int i = 0;
  2. QLayoutItem *child;
  3. while ((child = m_thumbnailsWidgetHLayout->takeAt(0)) != 0) {
  4. delete child->widget();
  5. delete child;
  6. }
To copy to clipboard, switch view to plain text mode