From 0e180dd50f7e031f1a5048c7804fc2a4eae413a0 Mon Sep 17 00:00:00 2001 From: Flavio Date: Wed, 12 Dec 2012 17:39:54 +0100 Subject: [PATCH] Fixed access to MainWindow statusbar --- src/segmentedcontrol.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/segmentedcontrol.cpp b/src/segmentedcontrol.cpp index d347ba0..418d3c8 100644 --- a/src/segmentedcontrol.cpp +++ b/src/segmentedcontrol.cpp @@ -1,5 +1,6 @@ #include "segmentedcontrol.h" #include "fontutils.h" +#include "mainwindow.h" static const QColor borderColor = QColor(0x26, 0x26, 0x26); @@ -104,7 +105,7 @@ void SegmentedControl::mouseMoveEvent (QMouseEvent *event) { update(); // status tip - static_cast(window())->statusBar()->showMessage(action->statusTip()); + MainWindow::instance()->statusBar()->showMessage(action->statusTip()); } } @@ -127,8 +128,8 @@ void SegmentedControl::mouseReleaseEvent(QMouseEvent *event) { void SegmentedControl::leaveEvent(QEvent *event) { QWidget::leaveEvent(event); - // status tip - static_cast(window())->statusBar()->clearMessage(); + // status tip + MainWindow::instance()->statusBar()->clearMessage(); d->hoveredAction = 0; d->pressedAction = 0; update(); -- 2.39.5