QT Problem, arduino serial port given garbage value. : I am trying to get the serial data and display it on the GUI, that i made in the QT for that when I try to get the serial data and display it in the output, it shows me this garbage type value.
"?\u0004?#\u0004??\u0004?#\u001C??"
"?\u0004?#\u0004??\u0004?#\u001C???\u0004?#\u001C"

this whole code is below, but the culprit lines are "readserial" function in the last.

  

      #include "dialog.h"
    #include "ui_dialog.h"
    #include <QSerialPort>
    #include<string>
    #include<QDebug>
    #include<QMessageBox>
    #include <QSerialPortInfo>
    
    
    Dialog::Dialog(QWidget *parent) :
        QDialog(parent),
        ui(new Ui::Dialog)
    {
        ui->setupUi(this);
        ui->label->setText("0");
        arduino = new QSerialPort(this);
        serialBuffer = "";
        bool arduino_is_availabe = false;
        QString arduino_uno_port_name;
        foreach(const QSerialPortInfo &serialPortInfo, QSerialPortInfo::availablePorts())
        {
            if(serialPortInfo.hasProductIdentifier() && serialPortInfo.hasVendorIdentifier())
            {
                if((serialPortInfo.productIdentifier() == arduino_uno_product_id) && (serialPortInfo.vendorIdentifier() == arduino_uno_vendor_id))
                {
                    arduino_is_availabe = true;
                    arduino_uno_port_name = serialPortInfo.portName();
                }
            }
        }
        if(arduino_is_availabe)
        {
            qDebug() <<"Found the arduino port...\n";
            arduino->setPortName(arduino_uno_port_name);
            arduino->open(QSerialPort::ReadOnly);
            arduino->setBaudRate(QSerialPort::Baud9600);
            arduino->setBaudRate(QSerialPort::Data8);
            arduino->setFlowControl(QSerialPort::NoFlowControl);
            arduino->setParity(QSerialPort::NoParity);
            arduino->setStopBits(QSerialPort::OneStop);
            QObject::connect(arduino, SIGNAL(readyRead()), this, SLOT(readSerial()));
    
        }else
        {
            qDebug() <<"Couldn't find the correct port for the arduino.\n";
            QMessageBox::information(this, "serial port error", "couldn't open the serial port to arduino ");
    
        }
    }
    Dialog::~Dialog()
    {
          if(arduino->isOpen())
           {
              arduino->close(); //    Close the serial port if it's open.
            }
        delete ui;
    }
    void Dialog::readSerial()
    {
        QByteArray serialData;
        serialData=arduino->readAll();
        serialBuffer+=QString::fromStdString(serialData.toStdString());
        qDebug()<<serialBuffer;
    }
    void Dialog::on_label_linkActivated(const QString &link)
    {
        ui->label->setText(serialBuffer);
    }

