QtWebEngineQuick Namespace

Qt WebEngine (Qt Quick) 模块的辅助函数。更多

头文件: #include <QtWebEngineQuick>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineQuick)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineQuick)
qmake: QT += webenginequick

功能

void initialize()

详细说明

QtWebEngineQuick 命名空间是Qt WebEngine 模块的一部分。

函数文档

void QtWebEngineQuick::initialize()

设置可在线程间共享的 OpenGL 上下文。这必须在创建QGuiApplication 和 window 的 QPlatformOpenGLContext 之前完成。

这与在创建QGuiApplication 之前通过QCoreApplication::setAttribute 设置Qt::AA_ShareOpenGLContexts 属性的效果相同。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.