CopperSpice API  1.9.1
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
 
void setCursorFlashTime (int cursorFlashTime)
 
bool setFocusOnTouchRelease () const
 
void setKeyboardInputInterval (int keyboardInputInterval)
 
void setMouseDoubleClickInterval (int mouseDoubleClickInterval)
 
void setStartDragDistance (int startDragDistance)
 
void setStartDragTime (int startDragTime)
 
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 to modify the user interface. This class provides access to several parameters for the current platform. The initial value for these parameters is based on the users operatiing system settings. These parameters maybe useful when implementing custom user interface components.

See also
QApplication::styleHints()

Method Documentation

int QStyleHints::cursorFlashTime ( ) const

Returns the value of the QStyleHints::cursorFlashTime 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 QStyleHints::fontSmoothingGamma property.

int QStyleHints::keyboardAutoRepeatRate ( ) const

Returns the value of the QStyleHints::keyboardAutoRepeatRate property.

int QStyleHints::keyboardInputInterval ( ) const

Returns the value of the QStyleHints::keyboardInputInterval 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 QStyleHints::mouseDoubleClickInterval 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 QStyleHints::mousePressAndHoldInterval property.

QChar QStyleHints::passwordMaskCharacter ( ) const

Returns the value of the QStyleHints::passwordMaskCharacter property.

int QStyleHints::passwordMaskDelay ( ) const

Returns the value of the QStyleHints::passwordMaskDelay property.

void QStyleHints::setCursorFlashTime ( int  cursorFlashTime)

Sets the value of the QStyleHints::cursorFlashTime property to cursorFlashTime.

bool QStyleHints::setFocusOnTouchRelease ( ) const

Returns the value of the QStyleHints::setFocusOnTouchRelease property.

void QStyleHints::setKeyboardInputInterval ( int  keyboardInputInterval)

Sets the value of the QStyleHints::keyboardInputInterval property to keyboardInputInterval.

void QStyleHints::setMouseDoubleClickInterval ( int  mouseDoubleClickInterval)

Sets the value of the QStyleHints::mouseDoubleClickInterval property to mouseDoubleClickInterval.

void QStyleHints::setStartDragDistance ( int  startDragDistance)

Sets the value of the QStyleHints::startDragDistance property to startDragDistance.

void QStyleHints::setStartDragTime ( int  startDragTime)

Sets the value of the QStyleHints::startDragTime property to startDragTime.

bool QStyleHints::showIsFullScreen ( ) const

Returns the value of the QStyleHints::showIsFullScreen property.

bool QStyleHints::showIsMaximized ( ) const

Returns the value of the QStyleHints::showIsMaximized property.

bool QStyleHints::singleClickActivation ( ) const

Returns the value of the QStyleHints::singleClickActivation property.

int QStyleHints::startDragDistance ( ) const

Returns the value of the QStyleHints::startDragDistance 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 QStyleHints::startDragTime 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 QStyleHints::startDragVelocityproperty.

Qt::TabFocusBehavior QStyleHints::tabFocusBehavior ( ) const

Returns the value of the QStyleHints::tabFocusBehavior property.

bool QStyleHints::useRtlExtensions ( ) const

Returns the value of the QStyleHints::useRtlExtensions 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. 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 indicates how long a new letter will be displayed when typed in a text input field which is in password mode. After the given number of msecs the letter will be replaced with a star or some other replacement character.

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

This property holds the event which sets input focus. The value of this property will be true if a widget should receive input focus after a touch/mouse release. This is the normal behavior on touch platforms. On desktop platforms the standard is to set focus on a touch/mouse press.

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

This property holds whether the platform defaults to fullscreen windows. The value of this property will be true if the platform defaults to windows being fullscreen, otherwise false is returned. 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 is returned. 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. The value of this property is true if items should be activated by single click and 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 similar to the following.

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 is returned.

PropertiesClass Methods
read useRtlExtensions
stored true
constant true
final