Python Forum
[PyQt] remove widgets of a layout
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] remove widgets of a layout
#3
Sorry that was copied when I was trying another approach to delete them, the function in the file is :
def clearlayout(layout):
    for i in reversed(range(layout.count())):
        print(layout.itemAt(i))
        layout.removeItem(layout.itemAt(i))
I'm new to pyqt, thank you for you suggestion I think I need to learn that now lol
Reply


Messages In This Thread
remove widgets of a layout - by catlessness - Apr-02-2020, 05:40 PM
RE: remove widgets of a layout - by deanhystad - Apr-02-2020, 07:20 PM
RE: remove widgets of a layout - by catlessness - Apr-02-2020, 07:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Grid layout and QHBox hobbyist 1 458 Jan-26-2021, 12:35 AM
Last Post: deanhystad
  pyqt5 layout Nickd12 8 827 Jan-18-2021, 09:09 AM
Last Post: Axel_Erfurt
  Delete Qt Layout manager deanhystad 2 500 Jan-10-2021, 08:33 PM
Last Post: deanhystad
  [Tkinter] Problems with frames layout Gupi 1 1,064 May-27-2019, 09:41 AM
Last Post: Yoriz
  Python GUI layout off between different OS shift838 5 1,613 Jan-02-2019, 02:53 AM
Last Post: shift838
  clear all widgets at same time (not delete/remove) shift838 0 1,154 Dec-17-2018, 11:55 PM
Last Post: shift838
  [PyQt] Layout unwanted space WatcherMagic 2 1,423 Dec-12-2018, 09:37 PM
Last Post: WatcherMagic
  [Tkinter] grid layout neech 8 12,937 Oct-14-2016, 07:06 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020