如何将我的 Qt 项目移动到另一台 PC

发布于 2024-10-08 05:51:50 字数 158 浏览 0 评论 0原文

我正在使用 Qt Creator 在 PC 上开发 Qt GUI 项目。我想将该项目转移到安装了 Qt Creator 的新 PC 上。我能否知道如何创建当前 qt 项目工作的单个包以导出到另一台 PC。

我尝试仅复制整个项目文件夹,但它不起作用。资源文件没有出现,我收到很多编译错误。

I am working on a Qt GUI project in a PC with Qt Creator. I want to shift this project to a new PC installed with Qt Creator. Can I know how can I create a single package of my current qt project work to export to another PC.

I tried to copy just the whole project folder but it din't work. The resource files din't came and I am getting a lot of compilation errors.

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

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

发布评论

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

评论(1

疯狂的代价 2024-10-15 05:51:50

但是,QtCreator 中没有导出/导入项目的选项...

如果您具有相同的配置,则可以在新计算机上复制应用程序的项目文件夹:

  • QtCreator 和 Qt 库安装在与旧计算机上相同的路径中。
  • 项目文件夹复制到其他计算机上的同一路径中。

原因很简单: Application.pro.user 文件包含绝对路径。

另一方面一方面,您可以将文件夹复制到任何新路径中。删除Application.pro.user文件。并在 QtCreator 中打开 Application.pro - 您将创建新的本地项目。 QtCreator 会询问您要使用哪个 Qt 版本。

如果您的资源文件有问题,请确保不使用绝对路径。
在文本编辑器中打开 resources.qrc 文件并查看其中的路径。

There is no such option to export/import a project in QtCreator, however...

You can copy a project folder of your application on new machine if you have identical configuration:

  • QtCreator and Qt library are installed in the same path as on old machine.
  • Project folder is copied into the same path on other machine.

The reason is simple: Application.pro.user file contains absolute paths.

On the other hand, you can copy your folder into any new path. Delete Application.pro.user file. And open Application.pro in QtCreator - you will create new local project. QtCreator will ask you what Qt version you want to use.

If you have a problem with your resource files, ensure that you do not use absolute paths.
Open resources.qrc file in text editor and see what paths you have there.

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