Qt Creator 需要一个编译器

Qt creator needs a compiler

我的 Qt 有问题 compiler.The 错误是:

Qt Creator 需要设置编译器才能构建。在套件选项中配置编译器。 代码是:

#include "mainwindow.h"
#include <QApplication>
#include<QLabel>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //   MainWindow w;
    //   w.show();

    QLabel *lb=new QLabel();
    lb->settext("first label");
    lb->setvisible(true);


    return a.exec();
}

Qt的版本是5.3.0,我有visual studio2010.

在网上我读到 Qt 的版本必须与 visual studio 兼容。

我想知道是 Qt 和 visual studio 版本的问题还是其他问题?

Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

从 QtCreator 的菜单中,打开 "Tools>Options>Build&Run>Kits"。如果没有自动检测到配置,则需要手动配置。

另外,请确保Qt5.3.0是用VS2010编译的。如果没有,请下载正确的版本,或者自己编译Qt源码。