I am currently working on Qt creator. I want to just get an image by browsing from hard drive in mainwindow and then after converting the RGB color image to gray image, I want to display the gray image in the another window.
By clicking the button "Browse", color image can be loaded where color to gray image conversion will be applied. Here grayImage is a public Mat type variable. At the same time an instance of another window named SecondDialog will be called to be executed.
void MainWindow::on_Browse_clicked()
{
QFileDialog dialog(this);
dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"));
dialog.setViewMode(QFileDialog::Detail);
fileName = QFileDialog::getOpenFileName(this, tr("Open Images"), "/home/rpi/Desktop/Picture/Sample Pictures", tr("Image Files (*.png *.jpg *.bmp)"));
if