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

Rui Maciel rui.maciel at gmail.com
Tue May 11 03:04:28 CEST 2010


Rui Maciel wrote:

> 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.

I've tried to implement this method but I stumbled on a problem.  The thing is, my internal widget 
inherits both QGLWidget and an attribute class which I named MdiWindowProperties.  Yet, 
QMdiSubWindow::activeSubWindow() returns a pointer to a QWidget object.  So the only class which I 
believe is available through a dynamic_cast<> is QGLWidget and not MdiWindowProperties. 

So, can anyone help?


Rui Maciel



More information about the Qt-interest-old mailing list