From kde-devel Thu Jun 19 22:33:02 2008 From: Andreas Pakulat Date: Thu, 19 Jun 2008 22:33:02 +0000 To: kde-devel Subject: KDialog breaks KAction inside textedit Message-Id: <20080619223302.GA10234 () morpheus ! apaku ! dnsalias ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=121391487307768 Hi, for a dialog (svn commit dialog actually) I wanted to implement support for pressing Ctrl+Return as shortcut for "ok". Unfortunately it seems like KDialog breaks shortcuts implemented via KAction inside textedits. The following is the code that sets up the action, adds it to the dialog and connects it to my "ok" slot: doCommit = new KAction( "Commit", this ); doCommit->setShortcut( Qt::CTRL + Qt::Key_Return ); doCommit->setShortcutContext( Qt::WidgetWithChildrenShortcut ); connect( doCommit, SIGNAL(triggered()), SLOT( ok() ) ); addAction(doCommit); however the slot is never called when I hit Ctrl+Return while the textedit of the commit dialog has focus. The textedit is a KTextEdit. When I change the class to use QDialog instead of KDialog everything works as expected. Anybody has an idea what might be going wrong here? Andreas -- Exercise caution in your daily affairs. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<