QT布局器问题
#include "QtGuiApplication20.h"
QtGuiApplication19::QtGuiApplication19(QWidget *parent)
: QWidget(parent)
{
//ui.setupUi(this);
infoLabel = new QLabel(this);
cmdLabel = new QLabel;
cmdLineEdit = new QLineEdit(this);
submitPushButton = new QPushButton(this);
cancelPushButton = new QPushButton(this);
browserPushButton = new QPushButton(this);
QHBoxLayout *cmdLayout = new QHBoxLayout(this);
cmdLayout->addWidget(cmdLabel);
cmdLayout->addWidget(cmdLineEdit);
QHBoxLayout *buttonLayout = new QHBoxLayout(this);
buttonLayout->addWidget(submitPushButton);
buttonLayout->addWidget(cancelPushButton);
buttonLayout->addWidget(browserPushButton);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(infoLabel);
mainLayout->addLayout(cmdLayout);
mainLayout->addLayout(buttonLayout);
this->setLayout(mainLayout);
}
1>------ 已启动生成: 项目: QtGuiApplication20, 配置: Debug x64 ------
1> Moc'ing QtGuiApplication20.h...
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(935,5): warning MSB8027: Two or more files with the name of moc_QtGuiApplication20.cpp will produce outputs to the same location. This can lead to an incorrect build result. The files involved are GeneratedFiles\Debug\moc_QtGuiApplication20.cpp, GeneratedFiles\Release\moc_QtGuiApplication20.cpp.
1> moc_QtGuiApplication20.cpp
1> main.cpp
1> QtGuiApplication20.cpp
1> 正在生成代码...
1> qrc_QtGuiApplication20.cpp
1> QtGuiApplication20.vcxproj -> D:\practice\QtGuiApplication20\x64\Debug\QtGuiApplication20.exe
========== 生成: 成功 1 个,失败 0 个,最新 0 个,跳过 0 个 ==========
出现此警告,布局也是混乱的,但是如果我只设置一个水平或垂直就一点问题都没有,也能正常显示,这是什么问题呢