[Kde-games-devel] Porting, KAccel

kde-games-devel@mail.kde.org kde-games-devel@mail.kde.org
Thu, 11 Apr 2002 16:47:37 +0200


Possibly some other people have run into the same problem:
I've been using KAccel for keyboard-input (i.e. movements), so the keys are 
configurable:

	accel->insertItem(i18n("Accelerate Leftwards"), "Left", Qt::Key_Left);

and then in key(Press|Release)Event (QKeyEvent *e):

	QString id = accel->findKey(e->key());

Now when porting to KDE 3, I found out that
a) insertItem (..) is now deprecated and the porting-guide suggests to use 
insert (...) instead, which would force me to specify a SLOT to connect the 
item to, which obviously isn't what I want.
b) the findKey (...) thing does not work anymore, all I ever get is an empty 
string. That of course renders the whole game unplayable.

Did anybody find a good solution to this problem, yet?

Thomas