[Kommander-devel] Re: Mainwindow proxy - again
Eric Laffoon
eric at kdewebdev.org
Thu Mar 27 00:23:55 EDT 2008
On Wednesday 26 March 2008 9:09:48 pm Eric Laffoon wrote:
> On Wednesday 26 March 2008 2:09:17 pm Sebastian Sauer wrote:
> > Eric Laffoon wrote:
> > > On Wednesday 26 March 2008 7:12:40 pm Eric Laffoon wrote:
> > >> On Wednesday 26 March 2008 4:03:07 pm Eric Laffoon wrote:
> > >> > On Wednesday 26 March 2008 3:41:17 pm Eric Laffoon wrote:
[..]
QWidget* mainWindow = QWidget::topLevelWidget();
QStatusBar* sb = dynamic_cast<QStatusBar*>(mainWindow->child("automatic
status bar"));
sb->message( action, param );
It seems so obvious... It's looking for a different type. I remember a friend
telling me how he never wanted to see another dynamic cast again after
working for one company. ;)
This works, but it's based on the notion that the window uses the default
naming giving by Designer, or more specifically the Kommander editor. Maybe I
can declare -any- text and type QStatusBar, but being such a novice... I
wasted a lot of time beating my head against the wall until this solution
burst forward as obvious. I'm willing to accept instruction to avoid an hour
in docs and another 20 tries. ;)
--
Eric Laffoon
Project Lead - kdewebdev module
More information about the Kommander-devel
mailing list