(layout: QtWidgets.QLayout, visible: bool)
| 695 | |
| 696 | |
| 697 | def set_layout_contents_visible(layout: QtWidgets.QLayout, visible: bool): |
| 698 | for i in range(layout.count()): |
| 699 | item = layout.itemAt(i) |
| 700 | |
| 701 | # If it's a widget item |
| 702 | widget = item.widget() |
| 703 | if widget is not None: |
| 704 | widget.setVisible(visible) |
| 705 | |
| 706 | # If it's a nested layout |
| 707 | child_layout = item.layout() |
| 708 | if child_layout is not None: |
| 709 | set_layout_contents_visible(child_layout, visible) |
no outgoing calls
no test coverage detected