Now that we have our app running, we can add some UI controls to it by extending the `main.cpp` file we created earlier. We will add some additional include directives, and then create a horizontal layout containing two push buttons. The layout with the two buttons will be shown in the window. Below is the complete updated source file:
.main.cpp
[source]
....
#include <QskWindow.h>
#include <QskLinearBox.h>
#include <QskPushButton.h>
#include <QGuiApplication>
int main( int argc, char* argv[] )
{
QGuiApplication app( argc, argv );
auto* horizontalBox = new QskLinearBox( Qt::Horizontal );
auto* button1 = new QskPushButton( "button 1", horizontalBox );
auto* button2 = new QskPushButton( "button 2", horizontalBox );
QskWindow window;
window.addItem( horizontalBox );
window.show();
return app.exec();
}
....
Now the app is displaying the two buttons:
image::../images/writing-first-application.png[An app showing two buttons]
That's it; you just created a QSkinny application from scratch.
For information on how the controls and layouts above behave, see the next chapters.