Created
May 18, 2016 15:49
-
-
Save boldijar/7026592a312df1aca6eef010b925010a to your computer and use it in GitHub Desktop.
andu pls help
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