[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: how do I bind a key from an application?
From: Waldo Bastian <bastian () kde ! org>
Date: 2000-06-26 21:22:19
[Download RAW message or body]
On Mon, 26 Jun 2000, Jesper K.Pedersen wrote:
> Hi.
>
> I have the following code:
> ---------------------------------------------------------------------------
>> void KarmWindow::prefs()
> {
> dialog = new KDialogBase(KDialogBase::Tabbed, "Preferences",
> KDialogBase::Ok | KDialogBase::Cancel,
> KDialogBase::Ok);
>
> QVBox *keys = dialog->addVBoxPage(i18n("Key Bindings"));
> keyChooser = new KKeyChooser(actionCollection()->keyDict(), keys);
> connect(dialog, SIGNAL(okClicked()), this, SLOT(prefsOk()));
> dialog->show();
> }
>
> void KarmWindow::prefsOk()
> {
> qDebug("OK\n");
> keyChooser->listSync();
> delete dialog;
> }
> <--------------------------------------------------------------------------
>-
>
> The problem is that the line
> keyChooser->listSync();
Another problem is that you can't delete the dialog from the okClicked() You
should call dialog->delayedDestruct() instead.
Cheers,
Waldo
--
Make way, KDE/Linux is coming to a desktop near you!
>> Visit http://master.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