我刚刚在Windows 10 PC上安装了Qt。我创建一个新项目,并在mainwindow.cpp文件中写一些行:
from("{{trade-publisher.trade-tnc.source-endpoint}}")
.doTry()
.bean(clientApi, "search(${body},${header.region})") //Returns List<Trade>
.split(simple("${body}"))
.parallelProcessing()
.aggregate(aggegrationStrategy) <-- MOVE AGGREGATOR INSIDE SPLIT
.completionTimeout(30000L)
.doTry()
.bean(clientApi,"enrich(${body})") //Passing Trade Object
.endDoTry()
.doCatch(Exception.class)
.log(LoggingLevel.ERROR, "ENRICHMENT-EXCEPTION : ${exception.stacktrace}")
.end() //End of Inner try catch
.end()// End of split() and parallelProcessing()
但是Qt环境在某些行上给了我错误:
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
}
MainWindow::~MainWindow() {
delete ui;
}
编译时:
mainwindow.cpp: 2: 10: error: 'ui_mainwindow.h' file not found
mainwindow.cpp: 4:24: error: unknown type name 'QWidget'
mainwindow.cpp: 6: 12: error: allocation of incomplete type 'Ui :: MainWindow'
mainwindow.h: 7: 7: note: forward declaration of 'Ui :: MainWindow'
mainwindow.cpp: 8: 7: error: member access into incomplete type 'Ui :: MainWindow'
mainwindow.h: 7: 7: note: forward declaration of 'Ui :: MainWindow'
如何解决这些问题?如何以及在哪里安装clang ++?
答案 0 :(得分:0)
您需要更改构建目录。 Settings -> under "Deskstop Qt...." build ->
,如果您的构建目录错误(如果错误,它将为红色)。您需要更改它。
新的构建目录必须是刚创建时保存Qt项目的文件夹。
答案 1 :(得分:0)
.pro项目文件上应该有QT + =小部件