24 lines
486 B
C++
24 lines
486 B
C++
#include <QtGui>
|
|
#include <QApplication>
|
|
#include <QtWidgets>
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
QHBoxLayout * layout = new QHBoxLayout();
|
|
|
|
QPushButton * button = new QPushButton("Press me");
|
|
layout->addWidget(button);
|
|
|
|
QLabel * label = new QLabel("Label");
|
|
layout->addWidget(label);
|
|
|
|
QWidget window;
|
|
window.setLayout(layout);
|
|
window.setWindowTitle("My Qt Application!");
|
|
window.show();
|
|
|
|
return app.exec();
|
|
}
|