I declared instance of CTester inside private section of QMainWindow:
private:
Ui::MainWindow *ui;
CTester aa;
private:
Ui::MainWindow *ui;
CTester aa;
To copy to clipboard, switch view to plain text mode
Then on the form designer I right click on the Get button and choose "GoTo SLot->clicked()" and enter this code:
void MainWindow::on_param1Get_clicked()
{
aa.GetParam1();
ui->param1Label->setText(s);
}
void MainWindow::on_param1Get_clicked()
{
aa.GetParam1();
QString s = QString::number(aa.GetParam1());
ui->param1Label->setText(s);
}
To copy to clipboard, switch view to plain text mode
It does give me a LNK2019 error on compile.
And also, I have a feeling that I'm trying to achieve this in an ugly way and there gotta be an elegant solution.
Bookmarks