Now I have:
QString fileName
= QFileDialog::getSaveFileName(this, tr
("Zapisz plik"),numer_fakt
+".epp",tr
("Pliki wymiany danych (*.epp)"));
if(fileName.size()==0) return;
return;
QString dane
= "Ę Ã“ Ą Ś Ł Ż Ź Ć Ń ę ó ą ś ł ż ź ć ";
QByteArray encodedString
= codec
->fromUnicode
(dane
);
out.setCodec(codec);
out << encodedString;
file.close();
QString numer_fakt = "222";
QString fileName = QFileDialog::getSaveFileName(this, tr("Zapisz plik"),numer_fakt+".epp",tr("Pliki wymiany danych (*.epp)"));
if(fileName.size()==0) return;
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QString dane = "Ę Ã“ Ą Ś Ł Ż Ź Ć Ń ę ó ą ś ł ż ź ć ";
QTextCodec *codec = QTextCodec::codecForName("Windows-1250");
QByteArray encodedString = codec->fromUnicode(dane);
QTextStream out(&file);
out.setCodec(codec);
out << encodedString;
file.close();
To copy to clipboard, switch view to plain text mode
what's next? in file I've got only ? ? ? ? sings :/
Bookmarks