Created
May 18, 2016 15:49
-
-
Save boldijar/3ee8ccc49f8888b39dca2f7de3468d2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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