[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KDialog breaks KAction inside textedit
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2008-06-19 22:33:02
Message-ID: 20080619223302.GA10234 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

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 <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic