Skip to content

Instantly share code, notes, and snippets.

@boldijar
Created May 18, 2016 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boldijar/7026592a312df1aca6eef010b925010a to your computer and use it in GitHub Desktop.
Save boldijar/7026592a312df1aca6eef010b925010a to your computer and use it in GitHub Desktop.
andu pls help
#include "mainwindow.h"
#include <QtWidgets\QTextEdit>
#include <QtWidgets\QPushButton>
#include <QVBoxLayout>
#include <stdio.h>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
design();
events();
}
void MainWindow::design() {
mLayout = new QVBoxLayout;
setLayout(mLayout);
mButton = new QPushButton("Apasa",this);
mLayout->addWidget(mButton);
}
void MainWindow::events()
{
connect(mButton, SIGNAL(released()), this, SLOT(onButtonClick()));
}
void MainWindow::onButtonClick()
{
mButton->setText(count+"");
count++;
}
MainWindow::~MainWindow()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment