#include <QApplication>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QWidget>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QLabel *infoLabel = new QLabel;
QLabel *openLabel = new QLabel;
QLineEdit* cmdLineEdit = new QLineEdit;
QPushButton* cancelButton = new QPushButton;
QPushButton* commitButton = new QPushButton;
infoLabel->setText("input cmd:");
openLabel->setText("open");
cancelButton->setText("cancel");
commitButton->setText("commit");
QHBoxLayout *cmdLayout = new QHBoxLayout;
cmdLayout->addWidget(openLabel);
cmdLayout->addWidget(cmdLineEdit);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(commitButton);
buttonLayout->addWidget(cancelButton);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(infoLabel);
mainLayout->addLayout(cmdLayout);
mainLayout->addLayout(buttonLayout);
QWidget w;
w.setLayout(mainLayout);
w.show();
return app.exec();
}