#include <QApplication>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *window = new QWidget;
QHBoxLayout *mainLayout = new QHBoxLayout;
QVBoxLayout *sideMenu = new QVBoxLayout;
QVBoxLayout *board = new QVBoxLayout;
QLabel *status = new QLabel("Let the game Start");
sideMenu->addWidget(status);
QPushButton *quit = new QPushButton("Quit");
QObject::connect(quit, SIGNAL(clicked()), &app, SLOT(quit()));
sideMenu->addWidget(quit);
QHBoxLayout *layout1 = new QHBoxLayout;
QHBoxLayout *layout2 = new QHBoxLayout;
QHBoxLayout *layout3 = new QHBoxLayout;
QPushButton *button11 = new QPushButton("1");
QPushButton *button12 = new QPushButton("2");
QPushButton *button13 = new QPushButton("3");
QObject::connect(button11, SIGNAL(clicked()), status, SLOT(setText("Button 1 is clicked")));
QObject::connect(button12, SIGNAL(clicked()), status, SLOT(setText("Button 2 is clicked")));
QObject::connect(button13, SIGNAL(clicked()), status, SLOT(setText("Button 3 is clicked")));
.
.
.
.
.
.
}
I have seen other threads regarding the same issue but I can't apply that solution to my problem.