#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "thread.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindowClass)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}
void MainWindow::inmain()
{
        sleep(1);
        ui->label->setText("a");
}
void MainWindow::setLabel(int value)
{
    char b;
    b=value;
    ui->label->setText(&b);
}
void MainWindow::inthread()
{
    connect(ptr,SIGNAL(setlabel(int)),this,SLOT(setLabel(int)));
    ptr=new mythread(this);
    ptr->start();
}
