【发布时间】:2023-01-11 23:55:12
【问题描述】:
我要存档的内容:
在我的应用程序的调试和发布构建版本中使用 QtQuick.Studio.Components。
操作系统:Windows 10
我做了什么:
我在 Qt QML 应用程序(社区版)中使用 QtQuick.Studio.Components 基于我必须手动构建模块的描述,因为该项目使用 qmake 而不是 cmake。
此处描述了构建步骤:
1 # Qt Design Studio QML modules
2
3 These modules provide the types
4
5 # Usage
6
7 The modules get installed into Qt and provide the respective imports for QML.
8
9 # Building
10
11 ```
12 mkdir build
13 cd build
14 cmake -GNinja -DCMAKE_INSTALL_PREFIX=path_to_qt_install_directory path_to_qtquickdesigner-components_cmake
15 cmake --build .
16 cmake --install .
17 ```
18
19 This will install the Qt Design Studio modules in your Qt installation directory.
我的命令调整到我的路径是cmake -GNinja --DCMAKE_INSTALL_PREFIX=C:\Qt\6.4.1\msvc2019_64\ C:\temp\designer2\qtquickdesigner-components
如果我在 QtCreator 中将我的应用程序构建为调试,那么我不会收到错误消息。 如果我在 QtCreator 中构建我的应用程序作为发布,那么我收到错误消息:
'C:/Qt/6.4.1/msvc2019_64/qml/QtQuick/Studio/Components/quickstudiocomponentsplugind.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)
问题:
- 如何将插件构建为 Release 和 Debug?
- 我必须如何定义安装前缀,因为我在我的安装中找不到 Qt 调试或 Qt 发布版本?
【问题讨论】: