Textractor/GUI/mainwindow.cpp

27 lines
579 B
C++
Raw Normal View History

2018-07-21 15:40:16 -07:00
#include "mainwindow.h"
#include "ui_mainwindow.h"
2018-07-22 16:53:51 -07:00
#include "QMessageBox"
#include "qlineedit.h"
#include <Windows.h>
#include "../texthook/host.h"
2018-07-21 15:40:16 -07:00
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
2018-07-22 16:53:51 -07:00
connect(ui->centralWidget->children().at(0), SIGNAL(returnPressed()), this, SLOT(onCommand()));
StartHost();
2018-07-21 15:40:16 -07:00
}
MainWindow::~MainWindow()
{
delete ui;
}
2018-07-22 16:53:51 -07:00
void MainWindow::onCommand()
{
QLineEdit* lineEdit = (QLineEdit*)sender();
QMessageBox::information(this, "called", lineEdit->text());
}