[Qt-interest] Mdi window design issue: tips welcomed

Rui Maciel rui.maciel at gmail.com
Sun May 9 17:27:56 CEST 2010


I'm writing a GUI application which implements a MDI interface that manages a unknown number (user-
defined) of MDI subwindow instances whose internal widgets can be a mix of a half dozen widget 
types.

The thing is, not all internal widgets provide the same features, some of which are available 
through the menus implemented in the main window.  Therefore I would like to implement a way to 
update those menus according to the features provided by the internal widget of the MDI subwindow 
which is currently active. 

The first solution that came to mind was to implement a class that provides a set of attributes 
which would be inherited by all widgets that would be used as internal widgets.  With that, it would 
be possible to connect the subWindowActivated() signal to a slot which would update the UI according 
to the properties of the activeWindow()'s internal widget.  Nonetheless, this option doesn't sound 
very elegant.

So, any suggestions?


Thanks in advance,
Rui Maciel



More information about the Qt-interest-old mailing list