【问题标题】:How to save QGraphicsScene items to a .dxf file如何将 QGraphicsScene 项目保存到 .dxf 文件
【发布时间】:2013-07-02 21:51:16
【问题描述】:

我将在 Qt 中编写一个使用 Qt Graphics View Framework 的应用程序。我有一个 QGraphicsScene,里面有一些简单的文本。我将导出要在 Corel Draw 中使用的场景。我认为最好的选择是将项目保存在 .dxf 文件中。有没有更好的办法?我应该使用 dxflib 吗?

【问题讨论】:

    标签: qt qgraphicsitem qgraphicsscene qgraphicstextitem


    【解决方案1】:

    Qt 支持带有绘图设备 QSvgGenerator 类的 svg 文件格式,其实例可以传递给 QPainter。

    如果您使用它保存为 svg(可缩放矢量图形),我希望 Corel Draw 能够导入它。

    只需将其添加到您的 .pro 文件中,确保您链接到 svg 模块:-

    QT += svg
    

    【讨论】:

      猜你喜欢
      • 2015-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-30
      相关资源
      最近更新 更多