switch ( we->type() )
{
case ActivateWidget:
+ myBar->updateActiveState();
emit activated( activeWidget() );
break;
case FocusWidget:
if ( activeWidget()->focusWidget()->hasFocus() )
{
QFocusEvent in( QEvent::FocusIn );
- QApplication::sendEvent( this, &in );
- }
- else
+ QApplication::sendEvent( this, &in );
+ }
+ else {
activeWidget()->focusWidget()->setFocus();
+ myBar->updateActiveState();
+ }
}
}
break;
{
QFrame::focusInEvent( e );
+ myBar->updateActiveState();
+
emit activated( activeWidget() );
}
emit contextMenuRequested( e->globalPos() );
}
+/*!
+ \brief Process widget change state events (style, palette, enable state changing, etc).
+ \param e change event (not used)
+*/
+void QtxWorkstackTabBar::changeEvent( QEvent* /*e*/ )
+{
+ updateActiveState();
+}
+
/*
void QtxWorkstackTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const
{
virtual void mousePressEvent( QMouseEvent* );
virtual void mouseReleaseEvent( QMouseEvent* );
virtual void contextMenuEvent( QContextMenuEvent* );
+ virtual void changeEvent( QEvent* );
// virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;