@Turbotroop
OK, so:
Is the code pasted now currently what you have, exactly?
What error do you currently have?
Have you acted on the previous comments?
For example: although it won't generate a compilation error, it does not make any sense to set up all these boxes or arrays in the main window destructor, does it? Why not in, say, the constructor instead?