image


image

image

image

image


image


image


image

image


image


image

image

image


image

image


image

image

Choose any images you want to load.

image

Go back to paramwindow.ui and add a label component to the window

image

image

Now we are going back to mainwindow.ui

image

image

image

image

image

#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "parameterwindow.h"
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}
 
MainWindow::~MainWindow()
{
    delete ui;
}
 
 
void MainWindow::on_pushButton_clicked()
{
    ParameterWindow parameterWindow;
    parameterWindow.setModal(true);
    parameterWindow.exec();
}

image






Refernces:

1. How to Show Another Window From MainWindow in QT

創作者介紹
創作者 天天向上 的頭像
me1237guy

天天向上

me1237guy 發表在 痞客邦 留言(0) 人氣( 49 )