-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
54 lines (38 loc) · 874 Bytes
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "test.h"
#include "ui_test.h"
test::test(QWidget *parent) :
QWidget(parent),
ui(new Ui::test)
{
ui->setupUi(this);
connect(&_Home, SIGNAL(createButton()), this, SLOT(LandingDateTime()));
connect(&_Home, SIGNAL(send5()), this, SLOT(get5()));
}
test::~test()
{
delete ui;
}
void test::LandingDateTime()
{
ui->dateTimeEdit->setDateTime(QDateTime::currentDateTime());
x = GLOBALS::instance()->getNum();;
std::string numstr = std::to_string(x);
ui->pushButton->setText(QString::fromStdString(numstr));
}
void test::on_pushButton_clicked()
{
int x = 10;
emit createPage(&x);
//getCount(&x);
std::string numstr = std::to_string(x);
ui->pushButton->setText(QString::fromStdString(numstr));
}
void test::getCount(int* num)
{
int* x = num;
*x = 20;
}
void test::get5()
{
emit numIs(x);
}