This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KXmlGuiWindow automatically creates Shortcut keys

Tags: None
(comma "," separated)
tzabal
Registered Member
Posts
4
Karma
0
OS
Hello fellows,

I am writing a KDE Application and i came across a weird (for me) behavior of the KXmlGuiWindow class. If the central widget contains a button with some text (ex. a QPushButton with text "Hello KDE"), it will automatically assign a shortcut key to the text of this button.

Image

I checked the KXmlGuiWindow class reference, and i assume that the problem can be solved by changing the StandardWindowOptions argument to something else than Default. Check the setupGUI() function to understand it better. Do you know how we achieve that?

If you have any idea on how we can block this behavior of KXmlGuiWindow, please post a reply.

Thanks in advance,
tzabal

Last edited by tzabal on Sat Jun 04, 2011 6:51 pm, edited 1 time in total.
pinotree
KDE Developer
Posts
222
Karma
7
OS
This should have nothing to do with KXmlGuiWindow, but it is due to KAcceleratorManager.
If you really want it disabled, use KAcceleratorManager::setNoAccel() on your button.


Pino Toscano
tzabal
Registered Member
Posts
4
Karma
0
OS
Yes, you are right pinotree. After using the KAcceleratorManager::setNoAccel(QWidget* widget) function on the button it worked.

I made the assumption that the problem was derived from the KXmlGuiWindow, because i tested the same code using the QMainWindow class, and i hadn't this problem.

Thank you very much for you reply :)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft