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.
オーバーフローして垂直スクロールバーが表示される前に、QPlainTextEdit コントロール (特定のサイズ) に収まる行数を何らかの方法で計算することは可能ですか?
ボックスの高さと幅を取得してから計算するのはどうですか。フォント形式に応じて、(手動で)そのための適切な数値を見つけようとすることができます。