'Мама'<tab>12'Папа'<tab>56
QFile f("reg.txt");QString s;f.open()=" << f.open(QIODevice::ReadOnly);f >> s;
regtest.cpp: In function ‘int main(int, char**)’:regtest.cpp:25: error: no match for ‘operator>>’ in ‘f >> s’/usr/include/qt4/QtCore/qchar.h:386: note: candidates are: QDataStream& operator>>(QDataStream&, QChar&)/usr/include/qt4/QtCore/qbytearray.h:565: note: QDataStream& operator>>(QDataStream&, QByteArray&)/usr/include/qt4/QtCore/qstring.h:1022: note: QDataStream& operator>>(QDataStream&, QString&).....
qDebug() <<"
% locale ~LANG=uk_UA.UTF-8LC_CTYPE="uk_UA.UTF-8"LC_NUMERIC="uk_UA.UTF-8"LC_TIME="uk_UA.UTF-8"LC_COLLATE="uk_UA.UTF-8"LC_MONETARY="uk_UA.UTF-8"LC_MESSAGES="uk_UA.UTF-8"LC_PAPER="uk_UA.UTF-8"LC_NAME="uk_UA.UTF-8"LC_ADDRESS="uk_UA.UTF-8"LC_TELEPHONE="uk_UA.UTF-8"LC_MEASUREMENT="uk_UA.UTF-8"LC_IDENTIFICATION="uk_UA.UTF-8"LC_ALL=
C++ (Qt) QString str = QString::fromUtf8( "Тестовая строка" ); qDebug() << str; qDebug() << str.toUtf8();