summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qstylehints.cpp13
-rw-r--r--src/gui/kernel/qstylehints.h5
2 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 6819aeaf2e..8374379d5a 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -278,15 +278,28 @@ int QStyleHints::keyboardInputInterval() const
themeableHint(QPlatformTheme::KeyboardInputInterval, QPlatformIntegration::KeyboardInputInterval).toInt();
}
+#if QT_DEPRECATED_SINCE(6, 5)
/*!
\property QStyleHints::keyboardAutoRepeatRate
\brief the rate, in events per second, in which additional repeated key
presses will automatically be generated if a key is being held down.
+ \deprecated Use keyboardAutoRepeatRateF() instead
*/
int QStyleHints::keyboardAutoRepeatRate() const
{
return themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toInt();
}
+#endif
+
+/*!
+ \property QStyleHints::keyboardAutoRepeatRateF
+ \brief the rate, in events per second, in which additional repeated key
+ presses will automatically be generated if a key is being held down.
+*/
+qreal QStyleHints::keyboardAutoRepeatRateF() const
+{
+ return themeableHint(QPlatformTheme::KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardAutoRepeatRate).toReal();
+}
/*!
Sets the \a cursorFlashTime.
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;