[Development] State of QT_KEYPAD_NAVIGATION (QtWidgets)
Volker Hilsheimer
volker.hilsheimer at qt.io
Mon May 11 21:02:20 CEST 2026
> On 11 May 2026, at 18:57, Christian Ehrlicher via Development <development at qt-project.org> wrote:
>
> Hello,
>
> recently I stumbled upon the QT_KEYPAD_NAVIGATION define in our widgets code. At first I was under the impression that this is defined by default similar to other features but this wasn't the case. Also I could not find a documentation for this and also no configure switch...
> Therefore the only way to compile it with this option is to set it in CMAKE_CXX_FLAGS directly which I did but soon got compiler errors due to missing functions. They were removed (partly by accident I would guess) during the Qt6.0 deprecated stuff cleanup.
>
> This means noone could compile this code since Qt6.0 but also noone complained about it. Therefore I would like to remove it completely but wanted to get some feedback if we maybe should try to fix the code instead (and convert it into a proper config option).
>
>
> What do you think?
>
> Christian
Guilty as charged for doing a half-arsed job during the Qt 6 clean-up days.
Historically, keyboard navigation was added in Widgets code to support feature- and smart-phone devices of the early 2000’s with their up/down/left/right/ok buttons. Greenphone, anyone? ;)
Equivalent devices continue to exist; but evidently nobody uses Qt for those, or at least not Qt Widgets. In Qt Quick, this kind of key handling for navigation is easier to implement in the UI code without having to quarrel with the framework.
So, given the status quo I do indeed think that we can remove that as dead code.
Volker
More information about the Development
mailing list