hijackWindow() 创建的上下文

发布于 2024-12-25 12:38:33 字数 553 浏览 8 评论 0原文

我正在使用 Visual Studio 2010 和 cl 编译器开发适用于 Windows 7 的桌面 Qt 4.7.1 应用程序。使用 OpenGL 小部件。

不久前,我在应用程序初始化期间开始收到类似以下消息:

hijackWindow() context created for QWidget(0x1c8f070, name = "x1") 1 
hijackWindow() context created for QGroupBox(0x1c8f5f8, name = "x2") 2 
hijackWindow() context created for QGroupBox(0x19f70b0, name = "x3") 3 
hijackWindow() context created for QGroupBox(0x19f9d40, name = "x4") 4 
hijackWindow() context created for QGraphicsView(0x19fae28, name = "x5") 5 

这些消息的原因是什么?由于窗口劫持会消耗大量时间,因此如何禁用它?

I'm developing desktop Qt 4.7.1 application for Windows 7 using Visual Studio 2010 and cl compiler. OpenGL widgets are used.

Some time ago I started to receive messages like the following ones during my application initialization:

hijackWindow() context created for QWidget(0x1c8f070, name = "x1") 1 
hijackWindow() context created for QGroupBox(0x1c8f5f8, name = "x2") 2 
hijackWindow() context created for QGroupBox(0x19f70b0, name = "x3") 3 
hijackWindow() context created for QGroupBox(0x19f9d40, name = "x4") 4 
hijackWindow() context created for QGraphicsView(0x19fae28, name = "x5") 5 

What could be the reason for these messages? How can I disable window hijacking since it consumes a lot of time?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苦妄 2025-01-01 12:38:33

这只是 Qt 库在为小部件创建 GL 上下文时发出的调试消息。我认为如果您使用 Qt 库的发布版本(它们必须使用定义的 QT_NO_DEBUG_OUTPUTQT_NO_DEBUG 宏来构建,这会禁用对 qDebug< 的调用,则不应出现此消息) /代码>)。

This is just a debug message emitted by Qt library when creating a GL context for a widget. I think this message should not appear if you use release versions of Qt libraries (they must be built with QT_NO_DEBUG_OUTPUT or QT_NO_DEBUG macros defined, which disables calls to qDebug).

不再让梦枯萎 2025-01-01 12:38:33

耗时的问题是使用opengl图形系统而不是光栅系统。所以解决方案是在命令行中添加以下参数:

-graphicssystem raster

或者使用此标志构建整个 Qt。

The problem of the time consuming was in using opengl graphics system instead of raster one. So the solution is to add the following parameter to command line:

-graphicssystem raster

Or to build the whole Qt with this flag.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文