Currently a point to all widgets are stored in a QMap. This works because all windows are subclassed from the same super class. The problem is that you cannot iterate through the map and call the liquidate method because the superclass does not posses such a method. It would therefore be easier to make all widgets subclass from a new window class called ParserWidgets which contains a virtual method "liquidate" and then use make the QMap a QMap of ParserWidgets. This would allow iteration through the map AND allow a uniform call of the liquidate method.