this->tempdir = new QString; //QString *tempdirqf_tempdir = new QFile("x:/tempdir/example.txt"); //QFile *qf_tempdir;QTextStream* in = new QTextStream(qf_tempdir);*tempdir = in->readAll();ui.textEdit->setText(*tempdir);
*tempdir->replace("a","b");
QString * tempdir; // WRONG!QString tempdir; // GOOD
file.setFileName( "x:/y/z.txt" );if ( file.open( QIODevice::ReadOnly ) ){ QTextStream in( &file ); ui.textEdit->setText( in.readAll() );}
QString qwe = in.readAll();qwe.replace("windows", "unix");n->ui.textEdit->setText(qwe);