qt - Qt4.8(或Qt 5)如何进行绘画工作?

标签 qt paint qt5

很难说出这里问的是什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或言辞激烈,无法以目前的形式合理回答。如需帮助澄清此问题以便可以重新打开,visit the help center .




9年前关闭。




它可能与“我的程序代码如何通过各种 Qt5 绘画系统转换到屏幕设备上的 GUI?”相同。

由于Qt支持各种平台,我的问题只针对Linux和Embedded Linux(因为两者都是开源操作系统,画法不同:-))。

我的问题集中在这些主题上:

  • QWidgetQGraphicsItemRectangle (在 QML 中)绘画系统不同?还有,这是什么?
  • 哪个不用QPainter ( QPaintEngine ) 类(class)?
  • Qt4.8(或Qt5)中实现了多少个绘制引擎?例如,QRasterPaintEngine .
  • 如果平台是Linux(支持X11),Qt会用X11 API做画吗?那么X11的绘画引擎和QRasterPaintEngine有什么区别? ?如果平台也支持OpenGL,那么Qt会使用X11 API还是OpenGL API?
  • 如果 GPU 支持 OpenGL,那么 Qt 可能会使用 OpenGL;但是如果GPU不支持OpenGL,那么Qt是如何处理这种情况的呢?
  • 最佳答案

    您的问题非常广泛,其中大部分都可以在 Qt QPaintEngine 文档中回答:

    https://doc.qt.io/qt-5/qpaintengine.html

    The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform. Qt 4.0 provides several premade implementations of QPaintEngine for the different painter backends we support. We provide one paint engine for each window system and painting framework we support. This includes X11 on Unix/Linux and CoreGraphics on Mac OS X. In addition we provide QPaintEngine implementations for OpenGL (accessible through QGLWidget) and PostScript (accessible through QPSPrinter on X11). Additionally there is a raster-based paint engine that is a fallback for when an engine does not support a certain capability.

    关于qt - Qt4.8(或Qt 5)如何进行绘画工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9047067/

    相关文章:

    java - android 绘制曲线

    c++ - 插入小部件的 QGridLayout 问题

    c++ - 使 QTcpServer 只接受 IPv4 连接

    c++ - 关于使用 QThreadStorage 的线程安全

    java - 将 Java GUI 组件绘制到图像文件

    javascript - 将 Canvas 元素反射到远程 Canvas 元素

    c++ - 如何将不断更新的c++数据显示到QML?

    qt5 - raspberry2 上的eglfs -- * 未能添加服务 - 已在使用中?

    Qt Creator 和主窗口背景图

    c++ - Qt:Qt5 Windows 中 BitBlt 的替代品