zarkzervo
8th May 2009, 09:03
I have a QWorkspace.
I can generate large amounts of the same type of widget: "DetailSummaryWdg" and add them to the workspace. I want to provide an action to this widget to close all widgets of the same type, i.e., the user wants to close all the detailsummaries with the click of a button.
I have tried traversing the children() of the QWorkspace and compare both objectName and metaObject()->className(), but when the objectName() of the object is "DetailSummaryWdg", the className from the same widget in the workspace is QWorkspaceChild and its objectName is qt_workspacechild.
Any suggestions on how I can remove all widgets of the same type/class?
I can generate large amounts of the same type of widget: "DetailSummaryWdg" and add them to the workspace. I want to provide an action to this widget to close all widgets of the same type, i.e., the user wants to close all the detailsummaries with the click of a button.
I have tried traversing the children() of the QWorkspace and compare both objectName and metaObject()->className(), but when the objectName() of the object is "DetailSummaryWdg", the className from the same widget in the workspace is QWorkspaceChild and its objectName is qt_workspacechild.
Any suggestions on how I can remove all widgets of the same type/class?