QStyleHints class contains platform specific hints and settings. 更多...
头: | #include <QStyleHints> |
qmake: | QT += gui |
Since: | Qt 5.0 |
继承: | QObject |
|
|
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 |
void | setUseHoverEffects (bool useHoverEffects ) |
bool | showIsFullScreen () const |
bool | showIsMaximized () const |
bool | singleClickActivation () const |
int | startDragDistance () const |
int | startDragTime () const |
int | startDragVelocity () const |
Qt::TabFocusBehavior | tabFocusBehavior () const |
bool | useHoverEffects () const |
bool | useRtlExtensions () const |
int | wheelScrollLines () const |
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 | wheelScrollLinesChanged (int scrollLines ) |
QStyleHints class contains platform specific hints and settings.
An object of this class, obtained from QGuiApplication , 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 behaviour and feel as other components.
另请参阅 QGuiApplication::styleHints ().
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.
访问函数:
int | cursorFlashTime () const |
通知程序信号:
void | cursorFlashTimeChanged (int cursorFlashTime ) |
This property holds the gamma value used in font smoothing.
访问函数:
qreal | fontSmoothingGamma () const |
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.
访问函数:
int | keyboardAutoRepeatRate () const |
This property holds the time limit, in milliseconds, that distinguishes a key press from two consecutive key presses.
访问函数:
int | keyboardInputInterval () const |
通知程序信号:
void | keyboardInputIntervalChanged (int keyboardInputInterval ) |
This property holds the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.
访问函数:
int | mouseDoubleClickInterval () const |
通知程序信号:
void | mouseDoubleClickIntervalChanged (int mouseDoubleClickInterval ) |
This property holds the time limit in milliseconds that activates a press and hold.
该特性在 Qt 5.3 引入。
访问函数:
int | mousePressAndHoldInterval () const |
通知程序信号:
void | mousePressAndHoldIntervalChanged (int mousePressAndHoldInterval ) |
This property holds the character used to mask the characters typed into text input fields in password mode.
访问函数:
QChar | passwordMaskCharacter () const |
This property holds the time, in milliseconds, a typed letter is displayed unshrouded in a text input field in password mode.
访问函数:
int | passwordMaskDelay () const |
This property holds the event that should set input focus on focus objects.
此特性是
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.
访问函数:
bool | setFocusOnTouchRelease () const |
This property holds whether the platform defaults to fullscreen windows.
此特性是
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.
访问函数:
bool | showIsFullScreen () const |
另请参阅 QWindow::show () 和 showIsMaximized ().
This property holds whether the platform defaults to maximized windows.
此特性是
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.
该特性在 Qt 5.6 引入。
访问函数:
bool | showIsMaximized () const |
另请参阅 QWindow::show () 和 showIsFullScreen ().
This property holds whether items are activated by single or double click.
此特性是
true
if items should be activated by single click,
false
if they should be activated by double click instead.
该特性在 Qt 5.5 引入。
访问函数:
bool | singleClickActivation () const |
This property holds 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();
访问函数:
int | startDragDistance () const |
通知程序信号:
void | startDragDistanceChanged (int startDragDistance ) |
另请参阅 startDragTime , QPoint::manhattanLength (),和 拖放 .
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.
访问函数:
int | startDragTime () const |
通知程序信号:
void | startDragTimeChanged (int startDragTime ) |
另请参阅 startDragDistance and 拖放 .
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.
访问函数:
int | startDragVelocity () const |
另请参阅 startDragDistance and 拖放 .
This property holds the focus behavior on press of the tab key.
注意: Do not bind this value in QML because the change notifier signal is not implemented yet.
该特性在 Qt 5.5 引入。
访问函数:
Qt::TabFocusBehavior | tabFocusBehavior () const |
通知程序信号:
void | tabFocusBehaviorChanged (Qt::TabFocusBehavior tabFocusBehavior ) |
This property holds whether UI elements use hover effects.
此特性是
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.
This property was introduced in Qt 5.8.
访问函数:
bool | useHoverEffects () const |
void | setUseHoverEffects (bool useHoverEffects ) |
通知程序信号:
void | useHoverEffectsChanged (bool useHoverEffects ) |
This property holds the writing direction.
此特性是
true
if right-to-left writing direction is enabled, otherwise
false
.
访问函数:
bool | useRtlExtensions () const |
Number of lines to scroll by default for each wheel click.
该特性在 Qt 5.9 引入。
访问函数:
int | wheelScrollLines () const |
通知程序信号:
void | wheelScrollLinesChanged (int scrollLines ) |