QWindowsWindowFunctions 类

QWindowsWindowFunctions class is an inline class containing miscellaneous functionality for Windows window specific functionality. 更多...

头: #include <QWindowsWindowFunctions>
Since: Qt 5.5

公共类型

typedef IsTabletModeType
typedef SetHasBorderInFullScreen
typedef SetTouchWindowTouchType
typedef SetWindowActivationBehaviorType
enum TouchWindowTouchType { NormalTouch, FineTouch, WantPalmTouch }
flags TouchWindowTouchTypes
enum WindowActivationBehavior { DefaultActivateWindow, AlwaysActivateWindow }

静态公共成员

bool isTabletMode ()
const QByteArray isTabletModeIdentifier ()
void setHasBorderInFullScreen (QWindow * window , bool border )
const QByteArray setHasBorderInFullScreenIdentifier ()
void setTouchWindowTouchType (QWindow * window , TouchWindowTouchTypes type )
const QByteArray setTouchWindowTouchTypeIdentifier ()
void setWindowActivationBehavior (WindowActivationBehavior behavior )
const QByteArray setWindowActivationBehaviorIdentifier ()

详细描述

QWindowsWindowFunctions class is an inline class containing miscellaneous functionality for Windows window specific functionality.

常见用法模式如下:

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QPushButton topLevelWidget("Hello World!");
    topLevelWidget.winId(); //have to create the QWindow
    QWindow *tlwWindow = topLevelWidget.windowHandle();
    QWindowsWindowFunctions::setTouchWindowTouchType(tlwWindow, QWindowsWindowFunctions::WantPalmTouch);
    topLevelWidget.show();
    return app.exec();
}
					

注意: 此类没有二进制兼容性保证,意味使用它的应用程序只保证能工作于针对它开发的 Qt 版本。

成员类型文档编制

typedef QWindowsWindowFunctions:: IsTabletModeType

这是 typedef 对于函数返回通过 QGuiApplication::platformFunction () 当传递 isTabletModeIdentifier ().

该 typedef 在 Qt 5.9 引入。

typedef QWindowsWindowFunctions:: SetHasBorderInFullScreen

这是 typedef 对于函数返回通过 QGuiApplication::platformFunction 当传递 setHasBorderInFullScreenIdentifier .

typedef QWindowsWindowFunctions:: SetTouchWindowTouchType

这是 typedef 对于函数返回通过 QGuiApplication::platformFunction 当传递 setTouchWindowTouchTypeIdentifier .

typedef QWindowsWindowFunctions:: SetWindowActivationBehaviorType

这是 typedef 对于函数返回通过 QGuiApplication::platformFunction () 当传递 setWindowActivationBehaviorIdentifier ().

该 typedef 在 Qt 5.7 引入。

另请参阅 QWidget::activateWindow () 和 QWindow::requestActivate ().

enum QWindowsWindowFunctions:: TouchWindowTouchType
flags QWindowsWindowFunctions:: TouchWindowTouchTypes

此枚举表示 RegisterTouchWindow() 支持的 TouchWindow 触摸标志。

常量
QWindowsWindowFunctions::NormalTouch 0x00000000
QWindowsWindowFunctions::FineTouch 0x00000001
QWindowsWindowFunctions::WantPalmTouch 0x00000002

TouchWindowTouchTypes 类型是 typedef 对于 QFlags <TouchWindowTouchType>。它存储 TouchWindowTouchType 值的 OR 组合。

enum QWindowsWindowFunctions:: WindowActivationBehavior

此枚举指定行为为 QWidget::activateWindow () 和 QWindow::requestActivate ().

常量 描述
QWindowsWindowFunctions::DefaultActivateWindow 0 根据 Windows 操作系统默认行为激活窗口。这意味着在某些情况下窗口不会被激活 (最显而易见的是,当调用进程不是活动进程时);仅闪烁任务栏条目。
QWindowsWindowFunctions::AlwaysActivateWindow 1 窗口总是被激活,即使调用进程不是活动进程。

该枚举在 Qt 5.7 引入或被修改。

另请参阅 QWidget::activateWindow () 和 QWindow::requestActivate ().

成员函数文档编制

[static] bool QWindowsWindowFunctions:: isTabletMode ()

这是可直接使用的方便函数,而不是解析函数指针。返回 true 若 Windows 10 运转在 Tablet Mode 。在此模式下,Windows 强制所有应用程序主窗口以最大化状态打开。接着,应用程序应避免重置窗口尺寸或将几何体还原成非最大化状态。

该函数在 Qt 5.9 引入。

另请参阅 QWidget::showMaximized (), QWidget::saveGeometry (),和 QWidget::restoreGeometry ().

[static] const QByteArray QWindowsWindowFunctions:: isTabletModeIdentifier ()

返回的字节数组可用于查询 QGuiApplication::platformFunction () 以检索 IsTabletModeType 函数。

该函数在 Qt 5.9 引入。

[static] void QWindowsWindowFunctions:: setHasBorderInFullScreen ( QWindow * window , bool border )

这是可直接使用的方便函数,而不是解析函数指针。 window and border 将中继到函数检索通过 QGuiApplication 。当 border 为 true,它将启用全屏模式 WS_BORDER 标志,以使应用程序中的其它顶层窗口出现在顶部当需要时。

另请参阅 基于 OpenGL 的窗口全屏

该函数在 Qt 5.6 引入。

[static] const QByteArray QWindowsWindowFunctions:: setHasBorderInFullScreenIdentifier ()

此函数返回的字节数组可用于查询 QGuiApplication::platformFunction 以检索 SetHasBorderInFullScreen 函数。

该函数在 Qt 5.6 引入。

[static] void QWindowsWindowFunctions:: setTouchWindowTouchType ( QWindow * window , TouchWindowTouchTypes type )

这是可直接使用的方便函数,而不是解析函数指针。 window and type 将中继到函数检索通过 QGuiApplication

[static] const QByteArray QWindowsWindowFunctions:: setTouchWindowTouchTypeIdentifier ()

此函数返回的字节数组可用于查询 QGuiApplication::platformFunction 以检索 SetTouchWindowTouchType 函数。

[static] void QWindowsWindowFunctions:: setWindowActivationBehavior ( WindowActivationBehavior behavior )

这是可直接使用的方便函数,而不是解析函数指针。 behavior 将中继到函数检索通过 QGuiApplication .

该函数在 Qt 5.7 引入。

另请参阅 QWidget::activateWindow () 和 QWindow::requestActivate ().

[static] const QByteArray QWindowsWindowFunctions:: setWindowActivationBehaviorIdentifier ()

此函数返回的字节数组可用于查询 QGuiApplication::platformFunction () 以检索 SetWindowActivationBehaviorType 函数。

该函数在 Qt 5.7 引入。

另请参阅 QWidget::activateWindow () 和 QWindow::requestActivate ().