hijackWindow() 创建的上下文
我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这只是 Qt 库在为小部件创建 GL 上下文时发出的调试消息。我认为如果您使用 Qt 库的发布版本(它们必须使用定义的
QT_NO_DEBUG_OUTPUT
或QT_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
orQT_NO_DEBUG
macros defined, which disables calls toqDebug
).耗时的问题是使用opengl图形系统而不是光栅系统。所以解决方案是在命令行中添加以下参数:
或者使用此标志构建整个 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:
Or to build the whole Qt with this flag.