使用 OpenGL 进行 Qt 渲染
我正在为嵌入式平台开发 QML 应用程序,其中包括一个包含图像的 GridView 小部件。对我来说重要的是,在 GridView 中滚动会很流畅并且不会给 CPU 带来负载。我可以期望 Qt 使用 OpenGL 来渲染 GridView 吗?
I'm working on a QML application for an embedded platform which includes a GridView widget containing images. It's important for me that scrolling through the GridView will be smooth and will not put load on the CPU. Can I expect Qt to use OpenGL to render the GridView?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(3)
我面临着同样的问题。
没有为我工作。所以我将 OGWidget 设置为视口:
并且不要忘记在 *.pro 文件中添加 opengl。
I faced with the same problem.
haven`t work for me. So i set the OGWidget as a viewport:
and do not forget to add opengl in *.pro file.
根据
使用的平台或(Symbian) 。
您实例化 QApplication 对象之前
Depending on your platform use
or (Symbian)
before you instantiate the QApplication object.
默认情况下,Qt 不使用 OpenGL 渲染后端。您可以使用 QGlWidget 强制执行它。在您的情况下,当您想使用库存小部件时,您可以将渲染后端设置为命令行选项:
By default Qt does not use the OpenGL render backend. You can enforce it by using a QGlWidget. In your case, as you want to use a stock widget, you can set the render backend as a command line option: