#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
set_array();
// connect(ui->pushButton,&QPushButton::clicked,this,&MainWindow::text);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::set_array()
{
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
array[i][j] = j+1;
}
}
}
void MainWindow::on_pushButton_clicked()
{
ui->textEdit->append("1");
}
如何实现set_array的矩阵转置并通过appen输出到界面呢