The QWindowsWindowFunctions 類是包含 Windows 窗口特定功能雜項功能的內聯類。 更多...
| 頭: | #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 () |
The QWindowsWindowFunctions 類是包含 Windows 窗口特定功能雜項功能的內聯類。
常見用法模式如下:
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 對於函數返迴通過 QGuiApplication::platformFunction () 當傳遞 isTabletModeIdentifier ().
該 typedef 在 Qt 5.9 引入。
這是 typedef 對於函數返迴通過 QGuiApplication::platformFunction 當傳遞 setHasBorderInFullScreenIdentifier .
這是 typedef 對於函數返迴通過 QGuiApplication::platformFunction 當傳遞 setTouchWindowTouchTypeIdentifier .
這是 typedef 對於函數返迴通過 QGuiApplication::platformFunction () 當傳遞 setWindowActivationBehaviorIdentifier ().
該 typedef 在 Qt 5.7 引入。
另請參閱 QWidget::activateWindow () 和 QWindow::requestActivate ().
此枚舉錶示 RegisterTouchWindow() 支持的 TouchWindow 觸摸標誌。
| 常量 | 值 |
|---|---|
QWindowsWindowFunctions::NormalTouch
|
0x00000000
|
QWindowsWindowFunctions::FineTouch
|
0x00000001
|
QWindowsWindowFunctions::WantPalmTouch
|
0x00000002
|
TouchWindowTouchTypes 類型是 typedef 對於 QFlags <TouchWindowTouchType>。它存儲 TouchWindowTouchType 值的 OR 組閤。
此枚舉指定行為為 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 ().