10

在过去的几天里,我一直坚持这一点。我已经安装了 QT 4.8,也安装了库。但是当我开始创建一个新项目时,我只能选择使用 CMake 创建一个普通的 C++ 项目。我没有使用自动 qmake 的选项。我不知道为什么。如果有人可以请帮助它,将不胜感激。

这是我所看到的图片。

在此处输入图像描述

当我在偏好中看到套件时,我看到了这一点。

在此处输入图像描述

但是在 QT 版本部分,如果我点击它来选择一些东西,它是空的。没有什么可以选择的。

4

1 回答 1

15
  1. 添加一个 Qt 版本。 转到 Qt Creator > Preferences... > Build & Run > Qt 版本。
    • 单击添加。
    • On Mac, /usr is hidden by default, but you can access the path directly — press ⌘⇧G and type /usr into the popup.
    • Navigate to your qmake executable and click Open.
    • Under Helpers, expand Details, and click Build All.
  2. Add a Qt Kit. Go to Qt Creator > Preferences... > Build & Run > Kits.
    • Click Add.
    • Select your compiler and Qt version.
    • Click OK.
  3. Make sure the qmake-related plugins are enabled. Go to Qt Creator > About Plugins... and enable the following:
    • Build Systems > GenericProjectManager
    • Build Systems > Qt4ProjectManager
    • Build Systems > QtSupport
    • Qt Creator > ProjectExplorer
    • Qt Quick > QmlJSTools —从 Qt Creator 2.7.0 开始,qmake 项目现在需要 QmlJSTools,如果您安装了以前版本的 Qt Creator,则可能无法启用。
    • 然后,单击关闭并重新启动 Qt Creator。您现在应该能够创建 qmake 项目。
于 2013-03-30T13:33:15.603 回答