C++ (Qt)#include <QMessageBox>#include "mainwindow.h"#include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ ui->setupUi(this);} MainWindow::~MainWindow(){ delete ui;} void MainWindow::on_sendBtn_clicked(){ QMessageBox msgBox; msgBox->setText("TEST"); msgBox->exec();}
C++ (Qt)base operand of '->' has non-pointer type 'QMessageBox'