Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
実行時にカスタムHTMLファイルをQTextEditにロードするにはどうすればよいですか?
非常に簡単な方法の1つ。必ずドキュメントを確認し、エラー状態などを探してください。また、一度に1行ずつ読み取るよりも速い方法があるかもしれません。
QFile file( file_name ); QTextStream stream( &file ); QString string; while( !stream.atEnd() ) { stream >> string; ui_textEdit->insertHtml( string ); }