Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QStyleHints Class Reference

The QStyleHints class contains platform specific hints and settings. \inmodule QtGui. More...

#include <qstylehints.h>

Inheritance diagram for QStyleHints:
Collaboration diagram for QStyleHints:

Signals

void cursorFlashTimeChanged (int cursorFlashTime)
void keyboardInputIntervalChanged (int keyboardInputInterval)
void mouseDoubleClickIntervalChanged (int mouseDoubleClickInterval)
void mousePressAndHoldIntervalChanged (int mousePressAndHoldInterval)
void startDragDistanceChanged (int startDragDistance)
void startDragTimeChanged (int startDragTime)
void tabFocusBehaviorChanged (Qt::TabFocusBehavior tabFocusBehavior)
void useHoverEffectsChanged (bool useHoverEffects)
void showShortcutsInContextMenusChanged (bool)
void contextMenuTriggerChanged (Qt::ContextMenuTrigger contextMenuTrigger)
void wheelScrollLinesChanged (int scrollLines)
void mouseQuickSelectionThresholdChanged (int threshold)
void colorSchemeChanged (Qt::ColorScheme colorScheme)
Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.

Public Member Functions

void setMouseDoubleClickInterval (int mouseDoubleClickInterval)
 Sets the mouseDoubleClickInterval.
int mouseDoubleClickInterval () const
int mouseDoubleClickDistance () const
int touchDoubleTapDistance () const
void setMousePressAndHoldInterval (int mousePressAndHoldInterval)
 Sets the mousePressAndHoldInterval.
int mousePressAndHoldInterval () const
void setStartDragDistance (int startDragDistance)
 Sets the startDragDistance.
int startDragDistance () const
void setStartDragTime (int startDragTime)
 Sets the startDragDragTime.
int startDragTime () const
int startDragVelocity () const
void setKeyboardInputInterval (int keyboardInputInterval)
 Sets the keyboardInputInterval.
int keyboardInputInterval () const
qreal keyboardAutoRepeatRateF () const
void setCursorFlashTime (int cursorFlashTime)
 Sets the cursorFlashTime.
int cursorFlashTime () const
bool showIsFullScreen () const
bool showIsMaximized () const
bool showShortcutsInContextMenus () const
void setShowShortcutsInContextMenus (bool showShortcutsInContextMenus)
Qt::ContextMenuTrigger contextMenuTrigger () const
void setContextMenuTrigger (Qt::ContextMenuTrigger contextMenuTrigger)
bool menuSelectionWraps () const
int passwordMaskDelay () const
QChar passwordMaskCharacter () const
qreal fontSmoothingGamma () const
bool useRtlExtensions () const
bool setFocusOnTouchRelease () const
Qt::TabFocusBehavior tabFocusBehavior () const
void setTabFocusBehavior (Qt::TabFocusBehavior tabFocusBehavior)
 Sets the tabFocusBehavior.
bool singleClickActivation () const
bool useHoverEffects () const
void setUseHoverEffects (bool useHoverEffects)
int wheelScrollLines () const
void setWheelScrollLines (int scrollLines)
 Sets the wheelScrollLines.
void setMouseQuickSelectionThreshold (int threshold)
 Sets the mouse quick selection threshold.
int mouseQuickSelectionThreshold () const
Qt::ColorScheme colorScheme () const
void setColorScheme (Qt::ColorScheme scheme)
void unsetColorScheme ()
const QAccessibilityHintsaccessibility () const
Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
QString objectName () const
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
QBindable< QStringbindableObjectName ()
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
bool isQmlObjectType () const
 Returns whether the object has been created by the QML engine or ownership has been explicitly set via QJSEngine::setObjectOwnership().
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
QThreadthread () const
 Returns the thread in which the object lives.
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
void killTimer (int id)
 Kills the timer with timer identifier, id.
void killTimer (Qt::TimerId id)
template<typename T>
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
template<typename T>
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
template<typename T>
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename T>
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const QObjectListchildren () const
 Returns a list of child objects.
void setParent (QObject *parent)
 Makes the object a child of parent.
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
bool disconnect (const QObject *receiver, const char *member=nullptr) const
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
bool setProperty (const char *name, QVariant &&value)
QVariant property (const char *name) const
 Returns the value of the object's name property.
QList< QByteArraydynamicPropertyNames () const
QBindingStoragebindingStorage ()
const QBindingStoragebindingStorage () const
QObjectparent () const
 Returns a pointer to the parent object.
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.

Properties

int cursorFlashTime
 the text cursor's flash (blink) time in milliseconds.
qreal fontSmoothingGamma
 the gamma value used in font smoothing.
qreal keyboardAutoRepeatRateF
 the rate, in events per second, in which additional repeated key presses will automatically be generated if a key is being held down.
int keyboardInputInterval
 the time limit, in milliseconds, that distinguishes a key press from two consecutive key presses.
int mouseDoubleClickInterval
 the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.
int mousePressAndHoldInterval
 the time limit in milliseconds that activates a press and hold.
QChar passwordMaskCharacter
 the character used to mask the characters typed into text input fields in password mode.
int passwordMaskDelay
 the time, in milliseconds, a typed letter is displayed unshrouded in a text input field in password mode.
bool setFocusOnTouchRelease
 the event that should set input focus on focus objects.
bool showIsFullScreen
 whether the platform defaults to fullscreen windows.
bool showIsMaximized
 whether the platform defaults to maximized windows.
bool showShortcutsInContextMenus
 true if the platform normally shows shortcut key sequences in context menus, otherwise false.
Qt::ContextMenuTrigger contextMenuTrigger
 mouse event used to trigger a context menu event.
int startDragDistance
 the distance, in pixels, that the mouse must be moved with a button held down before a drag and drop operation will begin.
int startDragTime
 the time, in milliseconds, that a mouse button must be held down before a drag and drop operation will begin.
int startDragVelocity
 the limit for the velocity, in pixels per second, that the mouse may be moved, with a button held down, for a drag and drop operation to begin.
bool useRtlExtensions
 the writing direction.
Qt::TabFocusBehavior tabFocusBehavior
 The focus behavior on press of the tab key.
bool singleClickActivation
 whether items are activated by single or double click.
bool useHoverEffects
 whether UI elements use hover effects.
int wheelScrollLines
 Number of lines to scroll by default for each wheel click.
int mouseQuickSelectionThreshold
 Quick selection mouse threshold in QLineEdit.
int mouseDoubleClickDistance
 the maximum distance, in pixels, that the mouse can be moved between two consecutive mouse clicks and still have it detected as a double-click
int touchDoubleTapDistance
 the maximum distance, in pixels, that a finger can be moved between two consecutive taps and still have it detected as a double-tap
Qt::ColorScheme colorScheme
 the color scheme used by the application.
bool menuSelectionWraps
 menu selection wraps around.
const QAccessibilityHintsaccessibility
 The application's accessibility hints.
Properties inherited from QObject
QString objectName
 the name of this object

Friends

class QGuiApplication

Additional Inherited Members

Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
template<typename Func1, typename Func2>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
template<typename Func1>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
int senderSignalIndex () const
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
bool isSignalConnected (const QMetaMethod &signal) const
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
virtual void connectNotify (const QMetaMethod &signal)
virtual void disconnectNotify (const QMetaMethod &signal)
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr

Detailed Description

The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.

Since
5.0

An object of this class, obtained from QGuiApplication, provides access to certain global user interface parameters of the current platform.

Access to most settings is read only. The platform itself usually provides the user with ways to tune these parameters. Authors of custom user interface components should read relevant settings to allow the components to exhibit the same behavior and feel as other components.

See also
QGuiApplication::styleHints()

Definition at line 16 of file qstylehints.h.

Member Function Documentation

◆ accessibility()

const QAccessibilityHints * QStyleHints::accessibility ( ) const

Definition at line 192 of file qstylehints.cpp.

◆ colorScheme()

Qt::ColorScheme QStyleHints::colorScheme ( ) const

Definition at line 152 of file qstylehints.cpp.

◆ colorSchemeChanged

void QStyleHints::colorSchemeChanged ( Qt::ColorScheme colorScheme)
signal

◆ contextMenuTrigger()

Qt::ContextMenuTrigger QStyleHints::contextMenuTrigger ( ) const

Definition at line 476 of file qstylehints.cpp.

◆ contextMenuTriggerChanged

void QStyleHints::contextMenuTriggerChanged ( Qt::ContextMenuTrigger contextMenuTrigger)
signal

◆ cursorFlashTime()

int QStyleHints::cursorFlashTime ( ) const

Definition at line 391 of file qstylehints.cpp.

◆ cursorFlashTimeChanged

void QStyleHints::cursorFlashTimeChanged ( int cursorFlashTime)
signal

◆ fontSmoothingGamma()

qreal QStyleHints::fontSmoothingGamma ( ) const

Definition at line 534 of file qstylehints.cpp.

◆ keyboardAutoRepeatRateF()

qreal QStyleHints::keyboardAutoRepeatRateF ( ) const

Definition at line 363 of file qstylehints.cpp.

◆ keyboardInputInterval()

int QStyleHints::keyboardInputInterval ( ) const

Definition at line 336 of file qstylehints.cpp.

◆ keyboardInputIntervalChanged

void QStyleHints::keyboardInputIntervalChanged ( int keyboardInputInterval)
signal

◆ menuSelectionWraps()

bool QStyleHints::menuSelectionWraps ( ) const

Definition at line 505 of file qstylehints.cpp.

◆ mouseDoubleClickDistance()

int QStyleHints::mouseDoubleClickDistance ( ) const

Definition at line 103 of file qstylehints.cpp.

◆ mouseDoubleClickInterval()

int QStyleHints::mouseDoubleClickInterval ( ) const

Definition at line 89 of file qstylehints.cpp.

◆ mouseDoubleClickIntervalChanged

void QStyleHints::mouseDoubleClickIntervalChanged ( int mouseDoubleClickInterval)
signal

◆ mousePressAndHoldInterval()

int QStyleHints::mousePressAndHoldInterval ( ) const

Definition at line 220 of file qstylehints.cpp.

◆ mousePressAndHoldIntervalChanged

void QStyleHints::mousePressAndHoldIntervalChanged ( int mousePressAndHoldInterval)
signal

◆ mouseQuickSelectionThreshold()

int QStyleHints::mouseQuickSelectionThreshold ( ) const

Definition at line 698 of file qstylehints.cpp.

◆ mouseQuickSelectionThresholdChanged

void QStyleHints::mouseQuickSelectionThresholdChanged ( int threshold)
signal

◆ passwordMaskCharacter()

QChar QStyleHints::passwordMaskCharacter ( ) const

Definition at line 525 of file qstylehints.cpp.

◆ passwordMaskDelay()

int QStyleHints::passwordMaskDelay ( ) const

Definition at line 515 of file qstylehints.cpp.

◆ setColorScheme()

void QStyleHints::setColorScheme ( Qt::ColorScheme scheme)
Since
6.8

Sets the color scheme used by the application to an explicit scheme, or revert to the system's current color scheme if scheme is Qt::ColorScheme::Unknown.

Definition at line 164 of file qstylehints.cpp.

◆ setContextMenuTrigger()

void QStyleHints::setContextMenuTrigger ( Qt::ContextMenuTrigger contextMenuTrigger)

Definition at line 487 of file qstylehints.cpp.

◆ setCursorFlashTime()

void QStyleHints::setCursorFlashTime ( int cursorFlashTime)

Sets the cursorFlashTime.

See also
cursorFlashTime()
Since
5.3

Definition at line 374 of file qstylehints.cpp.

◆ setFocusOnTouchRelease()

bool QStyleHints::setFocusOnTouchRelease ( ) const

Definition at line 560 of file qstylehints.cpp.

◆ setKeyboardInputInterval()

void QStyleHints::setKeyboardInputInterval ( int keyboardInputInterval)

Sets the keyboardInputInterval.

See also
keyboardInputInterval()
Since
5.3

Definition at line 322 of file qstylehints.cpp.

◆ setMouseDoubleClickInterval()

void QStyleHints::setMouseDoubleClickInterval ( int mouseDoubleClickInterval)

Sets the mouseDoubleClickInterval.

See also
mouseDoubleClickInterval()
Since
5.3

Definition at line 75 of file qstylehints.cpp.

◆ setMousePressAndHoldInterval()

void QStyleHints::setMousePressAndHoldInterval ( int mousePressAndHoldInterval)

Sets the mousePressAndHoldInterval.

See also
mousePressAndHoldInterval()
Since
5.7

Definition at line 204 of file qstylehints.cpp.

◆ setMouseQuickSelectionThreshold()

void QStyleHints::setMouseQuickSelectionThreshold ( int threshold)

Sets the mouse quick selection threshold.

See also
mouseQuickSelectionThreshold()
Since
5.11

Definition at line 678 of file qstylehints.cpp.

◆ setShowShortcutsInContextMenus()

void QStyleHints::setShowShortcutsInContextMenus ( bool showShortcutsInContextMenus)

Definition at line 453 of file qstylehints.cpp.

◆ setStartDragDistance()

void QStyleHints::setStartDragDistance ( int startDragDistance)

Sets the startDragDistance.

See also
startDragDistance()
Since
5.3

Definition at line 234 of file qstylehints.cpp.

◆ setStartDragTime()

void QStyleHints::setStartDragTime ( int startDragTime)

Sets the startDragDragTime.

See also
startDragTime()
Since
5.3

Definition at line 275 of file qstylehints.cpp.

◆ setTabFocusBehavior()

void QStyleHints::setTabFocusBehavior ( Qt::TabFocusBehavior tabFocusBehavior)

Sets the tabFocusBehavior.

See also
tabFocusBehavior()
Since
5.7

Definition at line 588 of file qstylehints.cpp.

◆ setUseHoverEffects()

void QStyleHints::setUseHoverEffects ( bool useHoverEffects)

Definition at line 629 of file qstylehints.cpp.

◆ setWheelScrollLines()

void QStyleHints::setWheelScrollLines ( int scrollLines)

Sets the wheelScrollLines.

See also
wheelScrollLines()
Since
5.9

Definition at line 663 of file qstylehints.cpp.

◆ showIsFullScreen()

bool QStyleHints::showIsFullScreen ( ) const

Definition at line 411 of file qstylehints.cpp.

◆ showIsMaximized()

bool QStyleHints::showIsMaximized ( ) const

Definition at line 429 of file qstylehints.cpp.

◆ showShortcutsInContextMenus()

bool QStyleHints::showShortcutsInContextMenus ( ) const

Definition at line 445 of file qstylehints.cpp.

◆ showShortcutsInContextMenusChanged

void QStyleHints::showShortcutsInContextMenusChanged ( bool )
signal

◆ singleClickActivation()

bool QStyleHints::singleClickActivation ( ) const

Definition at line 606 of file qstylehints.cpp.

◆ startDragDistance()

int QStyleHints::startDragDistance ( ) const

Definition at line 261 of file qstylehints.cpp.

◆ startDragDistanceChanged

void QStyleHints::startDragDistanceChanged ( int startDragDistance)
signal

◆ startDragTime()

int QStyleHints::startDragTime ( ) const

Definition at line 295 of file qstylehints.cpp.

◆ startDragTimeChanged

void QStyleHints::startDragTimeChanged ( int startDragTime)
signal

◆ startDragVelocity()

int QStyleHints::startDragVelocity ( ) const

Definition at line 311 of file qstylehints.cpp.

◆ tabFocusBehavior()

Qt::TabFocusBehavior QStyleHints::tabFocusBehavior ( ) const

Definition at line 574 of file qstylehints.cpp.

◆ tabFocusBehaviorChanged

void QStyleHints::tabFocusBehaviorChanged ( Qt::TabFocusBehavior tabFocusBehavior)
signal

◆ touchDoubleTapDistance()

int QStyleHints::touchDoubleTapDistance ( ) const

Definition at line 117 of file qstylehints.cpp.

◆ unsetColorScheme()

void QStyleHints::unsetColorScheme ( )
inline
Since
6.8

Restores the color scheme to the system's current color scheme.

Definition at line 106 of file qstylehints.h.

◆ useHoverEffects()

bool QStyleHints::useHoverEffects ( ) const

Definition at line 621 of file qstylehints.cpp.

◆ useHoverEffectsChanged

void QStyleHints::useHoverEffectsChanged ( bool useHoverEffects)
signal

◆ useRtlExtensions()

bool QStyleHints::useRtlExtensions ( ) const

Definition at line 546 of file qstylehints.cpp.

◆ wheelScrollLines()

int QStyleHints::wheelScrollLines ( ) const

Definition at line 649 of file qstylehints.cpp.

◆ wheelScrollLinesChanged

void QStyleHints::wheelScrollLinesChanged ( int scrollLines)
signal

◆ QGuiApplication

friend class QGuiApplication
friend

Definition at line 125 of file qstylehints.h.

Property Documentation

◆ accessibility

const QAccessibilityHints* QStyleHints::accessibility
read

The application's accessibility hints.

The accessibility hints encapsulates platform dependent accessibility settings such as whether the user wishes the application to be in high contrast or not.

See also
QAccessibilityHints
Since
6.10

Definition at line 60 of file qstylehints.h.

◆ colorScheme

Qt::ColorScheme QStyleHints::colorScheme
readwrite

the color scheme used by the application.

By default, this follows the system's default color scheme (also known as appearance), and changes when the system color scheme changes (e.g. during dusk or dawn). Setting the color scheme to an explicit value will override the system setting and ignore any changes to the system's color scheme. However, doing so is a hint to the system, and overriding the color scheme is not supported on all platforms.

Resetting this property, or setting it to \l{Qt::ColorScheme::Unknown}, will remove the override and make the application follow the system default again. The property value will change to the color scheme the system currently has.

When this property changes, Qt will read the system palette and update the default palette, but won't overwrite palette entries that have been explicitly set by the application. When the colorSchemeChange() signal gets emitted, the old palette is still in effect.

Application-specific colors should be selected to work well with the effective palette, taking the current color scheme into account. To update application- specific colors when the effective palette changes, handle \l{QEvent::}{PaletteChange} or \l{QEvent::}{ApplicationPaletteChange} events.

See also
Qt::ColorScheme, QGuiApplication::palette(), QEvent::PaletteChange
Since
6.5

Definition at line 57 of file qstylehints.h.

◆ contextMenuTrigger

Qt::ContextMenuTrigger QStyleHints::contextMenuTrigger
read

mouse event used to trigger a context menu event.

Since
6.8

The default on UNIX systems is to show context menu on mouse button press event, while on Windows it is the mouse button release event. This property can be used to override the default platform behavior.

Note
Developers must use this property with great care, as it changes the default interaction mode that their users will expect on the platform that they are running on.
See also
Qt::ContextMenuTrigger

Definition at line 39 of file qstylehints.h.

◆ cursorFlashTime

int QStyleHints::cursorFlashTime
read

the text cursor's flash (blink) time in milliseconds.

The flash time is the time used to display, invert and restore the caret display. Usually the text cursor is displayed for half the cursor flash time, then hidden for the same amount of time.

Definition at line 20 of file qstylehints.h.

◆ fontSmoothingGamma

qreal QStyleHints::fontSmoothingGamma
read

the gamma value used in font smoothing.

Definition at line 21 of file qstylehints.h.

◆ keyboardAutoRepeatRateF

qreal QStyleHints::keyboardAutoRepeatRateF
read

the rate, in events per second, in which additional repeated key presses will automatically be generated if a key is being held down.

Since
6.5

Definition at line 25 of file qstylehints.h.

◆ keyboardInputInterval

int QStyleHints::keyboardInputInterval
read

the time limit, in milliseconds, that distinguishes a key press from two consecutive key presses.

Definition at line 26 of file qstylehints.h.

◆ menuSelectionWraps

bool QStyleHints::menuSelectionWraps
read

menu selection wraps around.

Since
6.10

Returns true if menu selection wraps. That is, whether key navigation moves the selection to the first menu item again after the last menu item has been reached, and vice versa.

Definition at line 59 of file qstylehints.h.

◆ mouseDoubleClickDistance

int QStyleHints::mouseDoubleClickDistance
read

the maximum distance, in pixels, that the mouse can be moved between two consecutive mouse clicks and still have it detected as a double-click

Since
5.14

Definition at line 54 of file qstylehints.h.

◆ mouseDoubleClickInterval

int QStyleHints::mouseDoubleClickInterval
read

the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.

Definition at line 28 of file qstylehints.h.

◆ mousePressAndHoldInterval

int QStyleHints::mousePressAndHoldInterval
read

the time limit in milliseconds that activates a press and hold.

Since
5.3

Definition at line 30 of file qstylehints.h.

◆ mouseQuickSelectionThreshold

int QStyleHints::mouseQuickSelectionThreshold
readwrite

Quick selection mouse threshold in QLineEdit.

This property defines how much the mouse cursor should be moved along the y axis to trigger a quick selection during a normal QLineEdit text selection.

If the property value is less than or equal to 0, the quick selection feature is disabled.

Since
5.11

Definition at line 51 of file qstylehints.h.

◆ passwordMaskCharacter

QChar QStyleHints::passwordMaskCharacter
read

the character used to mask the characters typed into text input fields in password mode.

Definition at line 32 of file qstylehints.h.

◆ passwordMaskDelay

int QStyleHints::passwordMaskDelay
read

the time, in milliseconds, a typed letter is displayed unshrouded in a text input field in password mode.

Definition at line 33 of file qstylehints.h.

◆ setFocusOnTouchRelease

bool QStyleHints::setFocusOnTouchRelease
read

the event that should set input focus on focus objects.

This property is true if focus objects (line edits etc) should receive input focus after a touch/mouse release. This is normal behavior on touch platforms. On desktop platforms, the standard is to set focus already on touch/mouse press.

Definition at line 34 of file qstylehints.h.

◆ showIsFullScreen

bool QStyleHints::showIsFullScreen
read

whether the platform defaults to fullscreen windows.

This property is true if the platform defaults to windows being fullscreen, otherwise false.

Note
The platform may still choose to show certain windows non-fullscreen, such as popups or dialogs. This property only reports the default behavior.
See also
QWindow::show(), showIsMaximized()

Definition at line 35 of file qstylehints.h.

◆ showIsMaximized

bool QStyleHints::showIsMaximized
read

whether the platform defaults to maximized windows.

This property is true if the platform defaults to windows being maximized, otherwise false.

Note
The platform may still choose to show certain windows non-maximized, such as popups or dialogs. This property only reports the default behavior.
See also
QWindow::show(), showIsFullScreen()
Since
5.6

Definition at line 36 of file qstylehints.h.

◆ showShortcutsInContextMenus

bool QStyleHints::showShortcutsInContextMenus
readwrite

true if the platform normally shows shortcut key sequences in context menus, otherwise false.

Since
5.10

Since Qt 5.13, the setShowShortcutsInContextMenus() function can be used to override the platform default.

See also
Qt::AA_DontShowShortcutsInContextMenus

Definition at line 37 of file qstylehints.h.

◆ singleClickActivation

bool QStyleHints::singleClickActivation
read

whether items are activated by single or double click.

This property is true if items should be activated by single click, false if they should be activated by double click instead.

Since
5.5

Definition at line 47 of file qstylehints.h.

◆ startDragDistance

int QStyleHints::startDragDistance
read

the distance, in pixels, that the mouse must be moved with a button held down before a drag and drop operation will begin.

If you support drag and drop in your application, and want to start a drag and drop operation after the user has moved the cursor a certain distance with a button held down, you should use this property's value as the minimum distance required.

For example, if the mouse position of the click is stored in startPos and the current position (e.g. in the mouse move event) is currentPos, you can find out if a drag should be started with code like this:

See also
startDragTime, QPoint::manhattanLength(), {Drag and Drop}

Definition at line 41 of file qstylehints.h.

◆ startDragTime

int QStyleHints::startDragTime
read

the time, in milliseconds, that a mouse button must be held down before a drag and drop operation will begin.

If you support drag and drop in your application, and want to start a drag and drop operation after the user has held down a mouse button for a certain amount of time, you should use this property's value as the delay.

See also
startDragDistance, {Drag and Drop}

Definition at line 42 of file qstylehints.h.

◆ startDragVelocity

int QStyleHints::startDragVelocity
read

the limit for the velocity, in pixels per second, that the mouse may be moved, with a button held down, for a drag and drop operation to begin.

A value of 0 means there is no such limit.

See also
startDragDistance, {Drag and Drop}

Definition at line 43 of file qstylehints.h.

◆ tabFocusBehavior

Qt::TabFocusBehavior QStyleHints::tabFocusBehavior
read

The focus behavior on press of the tab key.

Since
5.5
Note
Do not bind this value in QML because the change notifier signal is not implemented yet.

Definition at line 45 of file qstylehints.h.

◆ touchDoubleTapDistance

int QStyleHints::touchDoubleTapDistance
read

the maximum distance, in pixels, that a finger can be moved between two consecutive taps and still have it detected as a double-tap

Since
5.14

Definition at line 56 of file qstylehints.h.

◆ useHoverEffects

bool QStyleHints::useHoverEffects
readwrite

whether UI elements use hover effects.

This property is true if UI elements should use hover effects. This is the standard behavior on desktop platforms with a mouse pointer, whereas on touch platforms the overhead of hover event delivery can be avoided.

Since
5.8

Definition at line 48 of file qstylehints.h.

◆ useRtlExtensions

bool QStyleHints::useRtlExtensions
read

the writing direction.

This property is true if right-to-left writing direction is enabled, otherwise false.

Definition at line 44 of file qstylehints.h.

◆ wheelScrollLines

int QStyleHints::wheelScrollLines
read

Number of lines to scroll by default for each wheel click.

Since
5.9

Definition at line 50 of file qstylehints.h.


The documentation for this class was generated from the following files: