Am Tue, 18 Oct 2011 15:20:50 +0530 schrieb Yogesh Marwaha <yogeshm....@gmail.com>:
> Hi, > > I'm still waiting for more suggestions :-) Assuming you want _ONE_ shortcut[1] in every case (eg. F3 cuts in editor1 if that has the focus, editor2 if that has the focus and editor three resp.), add the shortcut to the parenting window, bind it's action to a wrapper slot which triggers the shortcut on the widget which has the focus. If the focuswidget / type is undetectable so you cannot eg. if ( QApplication::focusWidget() == m_editor1 ) m_editor1->cut(); or if ( MyTextEditor* editor = qobject_cast<MyTextEditor*>(QApplication::focusWidget()) ) editor1->cut(); you can still QMetaObject::invokeMethod( QApplication::focusWidget(), "cut", Qt::DirectConnection); if you've public slots: void cut(); [1] Otherwise just add all actions (for each editor and with different names) Cheers, Thomas >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<