CopperSpice API  1.9.0
QStyleHints Class Reference

The QStyleHints class contains platform specific hints and settings. More...

Inheritance diagram for QStyleHints:
QObject

Public Signals

void cursorFlashTimeChanged (int cursorFlashTime)
 
void keyboardInputIntervalChanged (int keyboardInputInterval)
 
void mouseDoubleClickIntervalChanged (int mouseDoubleClickInterval)
 
void startDragDistanceChanged (int startDragDistance)
 
void startDragTimeChanged (int startDragTime)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

int cursorFlashTime () const
 
qreal fontSmoothingGamma () const
 
int keyboardAutoRepeatRate () const
 
int keyboardInputInterval () const
 
int mouseDoubleClickInterval () const
 
int mousePressAndHoldInterval () const
 
QChar passwordMaskCharacter () const
 
int passwordMaskDelay () const
 
bool setFocusOnTouchRelease () const
 
bool showIsFullScreen () const
 
bool showIsMaximized () const
 
bool singleClickActivation () const
 
int startDragDistance () const
 
int startDragTime () const
 
int startDragVelocity () const
 
Qt::TabFocusBehavior tabFocusBehavior () const
 
bool useRtlExtensions () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Properties

 cursorFlashTime
 
 fontSmoothingGamma
 
 keyboardAutoRepeatRate
 
 keyboardInputInterval
 
 mouseDoubleClickInterval
 
 mousePressAndHoldInterval
 
 passwordMaskCharacter
 
 passwordMaskDelay
 
 setFocusOnTouchRelease
 
 showIsFullScreen
 
 showIsMaximized
 
 singleClickActivation
 
 startDragDistance
 
 startDragTime
 
 startDragVelocity
 
 tabFocusBehavior
 
 useRtlExtensions
 
- Properties inherited from QObject
 objectName
 

Friends

class QApplication
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The QStyleHints class contains platform specific hints and settings. An object of this class, obtained from QApplication, provides access to certain global user interface parameters of the current platform.

Access is read only. Typically the platform itself provides the user a way to tune these parameters. Access to these parameters are useful when implementing custom user interface components, in that they allow the components to exhibit the same behavior and feel as other components.

See also
QApplication::styleHints()

Method Documentation

int QStyleHints::cursorFlashTime ( ) const

Returns the value of the property.

void QStyleHints::cursorFlashTimeChanged ( int  cursorFlashTime)
signal

This signal is emitted when the value of the property changes. The specified cursorFlashTime represents the updated value.

qreal QStyleHints::fontSmoothingGamma ( ) const

Returns the value of the property.

int QStyleHints::keyboardAutoRepeatRate ( ) const

Returns the value of the property.

int QStyleHints::keyboardInputInterval ( ) const

Returns the value of the property.

void QStyleHints::keyboardInputIntervalChanged ( int  keyboardInputInterval)
signal

This signal is emitted when the value of the property changes. The specified keyboardInputInterval represents the updated value.

int QStyleHints::mouseDoubleClickInterval ( ) const

Returns the value of the property.

void QStyleHints::mouseDoubleClickIntervalChanged ( int  mouseDoubleClickInterval)
signal

This signal is emitted when the value of the property changes. The specified mouseDoubleClickInterval represents the updated value.

int QStyleHints::mousePressAndHoldInterval ( ) const

Returns the value of the property.

QChar QStyleHints::passwordMaskCharacter ( ) const

Returns the value of the property.

int QStyleHints::passwordMaskDelay ( ) const

Returns the value of the property.

bool QStyleHints::setFocusOnTouchRelease ( ) const

Returns the value of the property.

bool QStyleHints::showIsFullScreen ( ) const

Returns the value of the property.

bool QStyleHints::showIsMaximized ( ) const

Returns the value of the property.

bool QStyleHints::singleClickActivation ( ) const

Returns the value of the property.

int QStyleHints::startDragDistance ( ) const

Returns the value of the property.

void QStyleHints::startDragDistanceChanged ( int  startDragDistance)
signal

This signal is emitted when the value of the property changes. The specified startDragDistance represents the updated value.

int QStyleHints::startDragTime ( ) const

Returns the value of the property.

void QStyleHints::startDragTimeChanged ( int  startDragTime)
signal

This signal is emitted when the value of the property changes. The specified startDragTime represents the updated value.

int QStyleHints::startDragVelocity ( ) const

Returns the value of the property.

Qt::TabFocusBehavior QStyleHints::tabFocusBehavior ( ) const

Returns the value of the property.

bool QStyleHints::useRtlExtensions ( ) const

Returns the value of the property.

Property Documentation

QStyleHints::cursorFlashTime

This property holds 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.

PropertiesClass Methods
read cursorFlashTime
notify cursorFlashTimeChanged
final
QStyleHints::fontSmoothingGamma

This property holds the gamma value used in font smoothing.

PropertiesClass Methods
read fontSmoothingGamma
stored true
constant true
final
QStyleHints::keyboardAutoRepeatRate

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

PropertiesClass Methods
read keyboardAutoRepeatRate
stored true
constant true
final
QStyleHints::keyboardInputInterval

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

PropertiesClass Methods
read keyboardInputInterval
notify keyboardInputIntervalChanged
final
QStyleHints::mouseDoubleClickInterval

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

PropertiesClass Methods
read mouseDoubleClickInterval
notify mouseDoubleClickIntervalChanged
final
QStyleHints::mousePressAndHoldInterval

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

PropertiesClass Methods
read mousePressAndHoldInterval
stored true
constant true
final
QStyleHints::passwordMaskCharacter

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

PropertiesClass Methods
read passwordMaskCharacter
stored true
constant true
final
QStyleHints::passwordMaskDelay

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

PropertiesClass Methods
read passwordMaskDelay
stored true
constant true
final
QStyleHints::setFocusOnTouchRelease

This property holds 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.

PropertiesClass Methods
read setFocusOnTouchRelease
stored true
constant true
final
QStyleHints::showIsFullScreen

This property holds whether the platform defaults to fullscreen windows. This property is true if the platform defaults to windows being fullscreen, otherwise false. The platform may still choose to show certain windows non-fullscreen, such as popups or dialogs. This property only reports the default behavior.

PropertiesClass Methods
read showIsFullScreen
stored true
constant true
final
QStyleHints::showIsMaximized

This property holds whether the platform defaults to maximized windows. This property is true if the platform defaults to windows being maximized, otherwise false. The platform may still choose to show certain windows non-maximized, such as popups or dialogs. This property only reports the default behavior.

PropertiesClass Methods
read showIsMaximized
stored true
constant true
final
QStyleHints::singleClickActivation

This property holds 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.

PropertiesClass Methods
read singleClickActivation
stored true
constant true
final
QStyleHints::startDragDistance

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:

if ((startPos - currentPos).manhattanLength() >= QApplication::startDragDistance()) {
startTheDrag();
}
See also
startDragTime, QPoint::manhattanLength(), Drag and Drop
PropertiesClass Methods
read startDragDistance
notify startDragDistanceChanged
final
QStyleHints::startDragTime

This property holds 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.

PropertiesClass Methods
read startDragTime
notify startDragTimeChanged
final
QStyleHints::startDragVelocity

This property holds 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.

PropertiesClass Methods
read startDragVelocity
stored true
constant true
final
QStyleHints::tabFocusBehavior

This property holds the focus behavior on press of the tab key.

PropertiesClass Methods
read tabFocusBehavior
stored true
constant true
final
QStyleHints::useRtlExtensions

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

PropertiesClass Methods
read useRtlExtensions
stored true
constant true
final