Every time you call EditObject:: window_elements_update() you are creating all of your EditObject's UI without removing the UI that was created in the last call. Extra checkboxes (without deleting the old ones - clear() does not do anything except erase the pointers. It does not delete the checkbox instances). You load all the same images over again even though you loaded them the last time through the function. You create a new list to hold the images without deleting the old one (another memory leak). This code is such a mess of mistakes it needs to be thrown out and completely rewritten.
I think you need to stop spewing out broken code, sit down, and write in words, not code what you want your application to do, and what should happen at each step in the process. Then, think about the data structures you need for the information your app handles, and the UI you need to display and interact with it.
If you don't do this, then every day you will run into another problem, your code will get buggier and buggier, and you will waste a huge amount of time trying random things to fix it because you haven't taken the time to do a proper design or to understand how to use Qt properly.
Bookmarks