![]() Registered Member ![]()
|
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. ![]() 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.
|
![]() KDE Developer ![]()
|
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
|
![]() Registered Member ![]()
|
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 ![]() |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft