From: interest-bounces+scott.bloom=onshorecs....@qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On Behalf Of R. Reucher Sent: Tuesday, April 24, 2012 5:27 AM To: interest@qt-project.org Subject: Re: [Interest] type casting 5 levels down no error but not proper
On Tuesday 24 April 2012 14:18:49 Rainer Wiesenfarth wrote: > 3. re-think your design and maybe even your architecture, as a (very) > low level widget in the hierarchy should not make assumptions like this > about its parents. How would your piece of code be ever reusable? I think this item (3) is the relevant point: reconsider your design :). HTH, René For just about every project I have, which has a mainwindow, Ill have slots in the main window slotMessage( const QString & ) and slotStatus( const QString & ) (messages go to the log, status to the status bar) Just about every child window will have a sigMessage and sigStatus, which gets connected to the parent windows sigMessage and sigStatus Sometimes you have to skip a "phony" parent but if I have a custom child widget that needs to send message or status, it works a lot cleaner... Scott
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest