Obsolete Members for Qt
Qt 类的以下成员已被废弃。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议不要在新代码中使用它们。
类型
(deprecated in 6.12) enum | NavigationMode { NavigationModeNone, NavigationModeKeypadTabOrder, NavigationModeKeypadDirectional, NavigationModeCursorAuto, NavigationModeCursorForceVisible } |
函数
(since 6.7, deprecated in 6.8) Qt::strong_ordering | compareThreeWay(const LeftType *lhs, const RightType *rhs) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Key key, Qt::KeyboardModifier modifier) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Key key, Qt::KeyboardModifiers modifiers) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Key key, Qt::Modifier modifier) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Key key, Qt::Modifiers modifiers) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::KeyboardModifier modifier, Qt::Key key) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::KeyboardModifiers modifiers, Qt::Key key) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Modifier modifier, Qt::Key key) |
(deprecated in 6.0) QKeyCombination | operator+(Qt::Modifiers modifiers, Qt::Key key) |
类型文档
[deprecated in 6.12] enum Qt::NavigationMode
该枚举自 6.12 版本起已弃用。我们强烈建议不要在新代码中使用它。
此枚举类型描述了焦点移动的模式。
| 常量 | 值 | 描述 |
|---|---|---|
Qt::NavigationModeNone | 0 | 仅使用触摸屏。 |
Qt::NavigationModeKeypadTabOrder | 1 | Qt::Key_Up 和Qt::Key_Down 用于更改焦点。 |
Qt::NavigationModeKeypadDirectional | 2 | Qt::Key_Up、Qt::Key_Down 、Qt::Key_Left 和Qt::Key_Right 用于更改焦点。 |
Qt::NavigationModeCursorAuto | 3 | 使用鼠标光标来更改焦点,它仅在非触摸屏设备上显示。 数字小键盘用于实现虚拟光标,除非设备配备模拟鼠标类型的输入设备(例如触控板)。对于需要在触摸和非触摸设备上均支持指针控制的应用程序(如网页浏览器),这是推荐的设置。 |
Qt::NavigationModeCursorForceVisible | 4 | 使用鼠标光标来切换焦点,无论设备类型如何,都会显示该光标。使用键盘来实现虚拟光标,除非设备具有模拟鼠标类型的输入设备(例如触摸板) 注意: 使用此枚举的 Qt API( |
函数文档
[constexpr noexcept, since 6.7, deprecated in 6.8] template <typename LeftType, typename RightType> requires if_compatible_pointers<LeftType, RightType> Qt::strong_ordering compareThreeWay(const LeftType *lhs, const RightType *rhs)
自 6.8 版本起,此函数已被废弃。我们强烈建议不要在新代码中使用它。
请将指针包装为Qt::totally_ordered_wrapper ,并改用相应的Qt::compareThreeWay()重载函数。
实现指针的三元比较。
返回一个Qt::strong_ordering 实例,该实例表示lhs 和rhs 之间的关系。
约束
仅当LeftType 和RightType 为同一类型,或为基类与派生类时,才参与重载解析。它也可用于比较指向std::nullptr_t 的任何指针。
这是一个重载函数。
该函数首次引入于 Qt 6.7。
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Modifier modifier, Qt::Key key)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::KeyboardModifier modifier, Qt::Key key)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Key key, Qt::Modifier modifier)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifier modifier)
自 6.0 起,此函数已弃用。我们强烈建议不要在新代码中使用它。
请改用 | 运算符。
返回一个QKeyCombination 对象,该对象表示key 与修饰符modifier 的组合。
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Modifiers modifiers, Qt::Key key)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::KeyboardModifiers modifiers, Qt::Key key)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Key key, Qt::Modifiers modifiers)
[constexpr noexcept, deprecated in 6.0] QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifiers modifiers)
自 6.0 版本起,此函数已被废弃。我们强烈建议不要在新代码中使用它。
请改用 | 运算符。
返回一个QKeyCombination 对象,该对象表示key 与修饰符modifiers 的组合。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.