Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
- , ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- tmp = new Class_2;
- connect(tmp, SIGNAL(send_name(QString str)), this, SLOT(name(QString str)));
- //connect(link, &Link::clicked, mainWindow, &MainWindow::doSmth);
- //connect(tmp, &tmp::send_name(QString str), this, &MainWindow::name(QString str));
- //connect(SECOND_CLASS, &SECOND_CLASS_NAME::textIsChanged, this, &FIRST_CLASS_NAME::textIsChangedSlot);
- connect(tmp, &tmp::send_name, this, MainWindow::name);
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
- void MainWindow::on_pushButton_clicked()
- {
- tmp->show();
- }
- void MainWindow::name(QString str)
- {
- user_name = str;
- ui->statusbar->showMessage(user_name);
- }
- void MainWindow::on_pushButton_2_clicked()
- {
- ui->statusbar->showMessage(user_name);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement