diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-28 21:25:53 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-29 17:17:04 +0200 |
commit | 87cabd0b92bc348f73be2fe0a20a57fa485f6665 (patch) | |
tree | 0ba9444c8b937900c3a759e703686f169884252b /src/gui/kernel/qstylehints.h | |
parent | ff4e624cd6b4320314ea93d142c707732cb01d4a (diff) |
Add QStyleHints::keyboardAutoRepeatRateF()
The keyboardAutoRepeatRate() function returning an int assumes
the rate can not be lower than one event per second, but this
is not always the case, e.g. on macOS where the slowest setting
for key repeat results in a two second delay between events.
Change-Id: I806fb57883ce0085c835fb0a43d6b86bd6da375a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/kernel/qstylehints.h')
-rw-r--r-- | src/gui/kernel/qstylehints.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index e32d9b5df3..37e742a24d 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -20,6 +20,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL) Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL) Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL) + Q_PROPERTY(int keyboardAutoRepeatRateF READ keyboardAutoRepeatRateF STORED false CONSTANT FINAL) Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval NOTIFY keyboardInputIntervalChanged FINAL) Q_PROPERTY(int mouseDoubleClickInterval READ mouseDoubleClickInterval @@ -65,7 +66,11 @@ public: int startDragVelocity() const; void setKeyboardInputInterval(int keyboardInputInterval); int keyboardInputInterval() const; +#if QT_DEPRECATED_SINCE(6, 5) + QT_DEPRECATED_VERSION_X_6_5("Use keyboardAutoRepeatRateF() instead") int keyboardAutoRepeatRate() const; +#endif + qreal keyboardAutoRepeatRateF() const; void setCursorFlashTime(int cursorFlashTime); int cursorFlashTime() const; bool showIsFullScreen() const; |