i am doing program to differwence the two notepad file but only one is showing and plese suggest me for the program in qt creator
Added after 45 minutes:
{
}
QString text
= in_stream1.
readAll();
{
}
//a=ui->plainTextEdit_3->setPlainText(text1);
ui
->plainTextEdit_3
->setPlainText
(QString::compare(text1,text1
));
QString file_name1=QFileDialog::getOpenFileName(this,"open a file","C://");
QFile file(file_name1);
if(!file.open(QFile::ReadOnly | QFile::Text))
{
QMessageBox::warning(this,"title","file not open");
}
QTextStream in_stream1(&file);
QString text= in_stream1.readAll();
QString file_name2=QFileDialog::getOpenFileName(this,"open a file","C://");
QFile file1(file_name2);
if(!file1.open(QFile::ReadOnly | QFile::Text))
{
QMessageBox::warning(this,"title","file not open");
}
QTextStream in_stream(&file1);
QString text1=in_stream.readAll();
//a=ui->plainTextEdit_3->setPlainText(text1);
ui->plainTextEdit_3->setPlainText(QString::compare(text1,text1));
To copy to clipboard, switch view to plain text mode
Added after 4 minutes:
how to compare these two file pleaze help
Bookmarks