Obsolete Members for QTextStream

QTextStream クラスの以下のメンバーは非推奨となっています。これらは、古いソースコードが動作し続けるように提供されているものです。新しいコードでの使用は強く推奨しません。

パブリック関数

(deprecated in 6.12) QTextStream &operator>>(char *c)

メンバー関数のドキュメント

[deprecated in 6.12] QTextStream &QTextStream::operator>>(char *c)

この関数は 6.12 以降、非推奨となっています。新しいコードでの使用は強くお勧めしません。

QByteArray のオーバーロードを使用してください。この関数は安全に使用できません。この関数はQt 7で削除される予定です。

単語をUTF-8に変換し、c に「'\0'」文字で区切られた形式で格納します。単語が存在しない場合は、「'\0'」文字のみが格納されます。

警告:この演算子は便利ですが、危険を伴うため、慎重に使用する必要があります。QTextStream は、c が単語を格納するのに十分な空き容量を持つバッファを指していると仮定します。バッファの容量が不足している場合、アプリケーションがクラッシュする可能性があります。n 個のQCharで構成される単語の場合、バッファの長さは少なくとも3*n+1 文字以上である必要があります。

可能であれば、代わりにQByteArray 演算子を使用してください。

これはオーバーロードされた関数です。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.